[TYPO3-templavoila] pdf print link

Dmitry Dulepov dmitry.dulepov at gmail.com
Mon Nov 10 14:08:26 CET 2008


Hi!

Steffen Kamper wrote:
> Does anybody knows a way how to do this? In TO there is the child "pdf
> version", so i thought calling page with &print=2 should do, but then no
> userfunc is in there, any ideas?

As you know I am slow today, so I could misunderstand your question.
Sorry if I do :D

I used pdf_generator2 (I think this was the extkey). If I remember
correctly, you had to pass a different typeNum to the URL. Different
typeNum selected a different page type with different userFunc. It
worked ok for me some time ago. You definitely cannot make TV do
generate PDF because TV can only generate HTML. To make PDFs, it
must be a separate userFunc from pdf_generator.

I do not know/remember why there is a separate rendering type there.
Probably PDF generator uses it in some way.

If you want to try that TO from the URL, it is easy. It is similar
to using print=1 for print version and only a bit trickier.

"print=1" is hard-coded in TV and corresponds to rendering type
'print'. To use your own type you need to do this in TS:

[globalVar = GP:print = 2]
page.10.childTemplate = 2
[global]

"2" in the condition can be anything else. You can even have
"display=pdf" or "render=pdf", just change the condition
appropriately. "2" in the "childTemplate=2" should correspond to the
value from pdf generator. I do not remember what it is but you can
easily find it using FireBug. "2" is not a uid! "2" is a rendering
type from select box ("value" of the <option> tag).

-- 
Dmitry Dulepov
TYPO3 translations support
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog:
http://typo3bloke.net/post-details/max_os_x_use_php_help_in_chm_format/


More information about the TYPO3-project-templavoila mailing list