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
Html generated instead PDF
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Html generated instead PDF
Hi, what happen when you disable SEF? Which format does the URL have?
Jan
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 3
- Joined: 29 Mar 2019, 19:27
Re: Html generated instead PDF
Hi Jan,
Thanks, I disabled "Add a suffix to the URL" to have now PDF (empty PDF but PDF).
Thanks again & regards
Thanks, I disabled "Add a suffix to the URL" to have now PDF (empty PDF but PDF).
Thanks again & regards
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
-
- Phoca Newbie
- Posts: 3
- Joined: 29 Mar 2019, 19:27
Re: Html generated instead PDF
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 !
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 !
- Jan
- Phoca Hero
- Posts: 48403
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Html generated instead PDF
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
Jan
If you find Phoca extensions useful, please support the project