Page 1 of 1

Problem with pdf style

Posted: 09 Jan 2015, 15:12
by Moris
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

Re: Problem with pdf style

Posted: 12 Jan 2015, 00:01
by Jan
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

Re: Problem with pdf style

Posted: 15 Jan 2015, 17:17
by Moris
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

Re: Problem with pdf style

Posted: 15 Jan 2015, 23:30
by Jan
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