mittwald / typo3-web2pdf

A TYPO3 extension for rendering content as PDF
GNU General Public License v2.0
18 stars 20 forks source link

Custom pdf title #9

Closed rareshluk closed 9 years ago

rareshluk commented 9 years ago

Is it possible to give the pdf the "custom" page title of the page, instead of the actual page:title?

For example, on a single view page of tt_news, called News details in the backend, I would like the pdf name to be "News title.pdf" instead of "News details.pdf"

Thanks, Luca

rareshluk commented 9 years ago

For example, having a dynamic news title on the single news page:

temp.newsTitle = RECORDS temp.newsTitle { dontCheckPid = 1 tables = tx_news_domain_model_news source.data = GP:tx_news_pi1|news source.intval = 1 conf.tx_news_domain_model_news = TEXT conf.tx_news_domain_model_news { field = title htmlSpecialChars = 1 } stdWrap.noTrimWrap = | | - WebsiteName| }

page.headerData.1 > page.headerData.1 < temp.newsTitle

Would it possible that the pdf takes the title that the script above generates for each news record?

kpurrmann commented 9 years ago

The correct way would be to configure the detail page , that the title of the news is displayed in title-tag.

rareshluk commented 9 years ago

It is displaying in the title tag. But the name of the pdf to download stay the same for all the news

kpurrmann commented 9 years ago

You're right. Improved in 217b50b. New version will be soon available.

rareshluk commented 9 years ago

Perfect! Thanks! Looking forward to it!

rareshluk commented 9 years ago

Hi,

Is this feature added in the 1.1 version?

Thanks

martin-helmich commented 9 years ago

@rareshluk, yes, this feature is included in the v1.1.0 version.

rareshluk commented 9 years ago

I have a page title generated via Typoscript and this doesn't get shown in the PDF title. It still shows the backend page title. Tested on v1.1 on TYPO3 ver. 6.2. On Aug 17, 2015 9:45 AM, "Martin Helmich" notifications@github.com wrote:

@rareshluk https://github.com/rareshluk, yes, this feature is included in the v1.1.0 version.

— Reply to this email directly or view it on GitHub https://github.com/mittwald/typo3-web2pdf/issues/9#issuecomment-131697932 .