Page 1 of 1
Html generated instead PDF
Posted: 29 Mar 2019, 19:40
by luciani
Hi,
I don't knwo why when I click on the pdf button the generated content is HTML instead of PDF.
I try with simple article and with the same result.
ex :
http://arkeotopia.org/fr/ressources/vei ... =component
Any idea ?
(joomla 3.9.3, phoca system 3.0.6, content 3.0.6, phoca pdf 3.0.8)
Thanks for your help
Re: Html generated instead PDF
Posted: 31 Mar 2019, 17:08
by Jan
Hi, what happen when you disable SEF? Which format does the URL have?
Jan
Re: Html generated instead PDF
Posted: 01 Apr 2019, 08:53
by luciani
Hi Jan,
Thanks, I disabled "Add a suffix to the URL" to have now PDF (empty PDF but PDF).
Thanks again & regards
Re: Html generated instead PDF
Posted: 01 Apr 2019, 16:40
by Jan
Ok
Re: Html generated instead PDF
Posted: 13 Apr 2019, 11:18
by luciani
So.
When I disabled "Add a suffix to the URL" the URL to export the PDF file contains "&format=pdf"
When I activated "Add a suffix to the URL" the URL doesn't contains "&format=pdf" and the export is in HTML
So I changed the template to add this PHP instruction :
$phocaPDF = str_replace("tmpl=component", "tmpl=component&format=pdf", $phocaPDF);
It works but that does not seem to me satisfactory.
Is there a better way to do this ???
Thanks !
Re: Html generated instead PDF
Posted: 18 Apr 2019, 15:41
by Jan
Hi, hard to say, I don't know the function of the suffixes, what is the reason to have them, but I think to run the PDF function with suffixes, the core Joomla! must be customized, so instead of xxx.html it ads xxx.pdf. Because it just seems that the suffix function tries to remove all possible values to get only the .html suffix
Jan