I got a task in my company to solve problem, why pdf menu card is wrong styled.
I found out that methods in phocamenurenderviews.php using getStyle method receive ever parameter ($method) of value 4, even when printing of pdf was called (then this parametr should be 2).
url called by pdf icon is smth like xxx/essen/speisekarte/saisonale-karte.pdf?tmpl=component
I fixed it with code: if (strpos($_SERVER["REQUEST_URI"], ".pdf")) $method = 2;
Then pdf has the right styling.
I would appreciate to hear if you had the same problem, or if I fixed it correct.
Thanks
Moris
Problem with pdf style
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problem with pdf style
Hi, thank you for the info.
Which version of Phoca PDF and Phoca Restaurant Menu you are using?
In which view you get the problem.
What happens when you disable SEF? (or at least the suffixes like .html, .pdf, etc.)
Jan
Which version of Phoca PDF and Phoca Restaurant Menu you are using?
In which view you get the problem.
What happens when you disable SEF? (or at least the suffixes like .html, .pdf, etc.)
Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 2
- Joined: 09 Jan 2015, 14:59
Re: Problem with pdf style
Hi Jan,
$method is ever 4 in all views(lunchmenu, beveragelist, winelist, dinnermenu)
Phocamenu version is 3.0.1
PhocaPDF version is 3.0.2
Thank you Jan
Nashle
$method is ever 4 in all views(lunchmenu, beveragelist, winelist, dinnermenu)
Phocamenu version is 3.0.1
PhocaPDF version is 3.0.2
Thank you Jan
Nashle
- Jan
- Phoca Hero
- Posts: 48402
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Problem with pdf style
Hi,
testing now and get no such problem, hmm, the 4 is only set in case, the bootstrap is displayed in html.
Did you test it with version 3.0.2 (PRM): https://www.phoca.cz/download/category/3 ... -component
Jan
testing now and get no such problem, hmm, the 4 is only set in case, the bootstrap is displayed in html.
Did you test it with version 3.0.2 (PRM): https://www.phoca.cz/download/category/3 ... -component
Jan
If you find Phoca extensions useful, please support the project