Page 1 of 2

PDF Not Generated in J!3.2

Posted: 18 Feb 2014, 20:20
by buddyq
I have a Joomla 3.2 site. I do have an override for html/com_content/article and I did replace/add code given in the instructions. I do see the PDF icon. However, when I click the PDF icon, the popup window comes up with just the article as seen in the screenshot. There is no pdf generated. I tried force download and that doesn't work either. Why isn't it generating a PDF?

Second question: Can I have a stylesheet for the pdf to follow? I need to change some things for pdf for example, the amount of padding in cells etc.

http://awesomescreenshot.com/01f2derj18

Re: PDF Not Generated in J!3.2

Posted: 19 Feb 2014, 23:02
by Jan
Hi,

this seems like the url to PDF is wrong, maybe some SEF issues, try to disable SEF.

CSS - PDF is not like HTML, see important notice here: https://www.phoca.cz/phocapdf
so the styling is very limited.

Jan

Re: PDF Not Generated in J!3.2

Posted: 26 Feb 2014, 19:49
by buddyq
So Phoca PDF does not work with standard Joomla SEF?

I turned off SEF and the PDF generated. This is a table of prices and the table goes off the page.

I can mess around with table width percentage vs absolute width. But this is pretty messy. I'm just using standard Joomla SEF. Any tips?

Re: PDF Not Generated in J!3.2

Posted: 26 Feb 2014, 20:48
by buddyq
With inline styling I got the table and background colors to show, cellpadding etc.

Is it possible for it to follow css styling? This is making me revert to 1980's website creation which is not a good thing. Any other way of getting styling done without making a horrible website?

Re: PDF Not Generated in J!3.2

Posted: 26 Feb 2014, 21:09
by buddyq
I found a way to fix it but I dont know where to make the code change. I don't see a JRoute:: in your code anywhere...

It works if I add &format=pdf to the end of the url its creating with SEF on.

Re: PDF Not Generated in J!3.2

Posted: 26 Feb 2014, 21:57
by buddyq
UPDATE::

I can see that you already have &format=pdf in there. So it seems the "format" is not being dealt with correctly for some reason and being ignored. The tmpl=component is printing out but not the format. Joomla seems to be dumping it for some reason.

Re: PDF Not Generated in J!3.2

Posted: 03 Mar 2014, 00:09
by Jan
Hi, the link uses JRoute and the format=pdf is there, try to see your SEF settings and try to see if you get it working without SEF on your site.

See the code:
administrator/components/com_phocapdf/helpers/phocapdf.php

Code: Select all

$url  = ContentHelperRoute::getArticleRoute($item->slug, $item->catid);
$url .= '&tmpl=component&format=pdf';//&page='.@ $request->limitstart;
...
$output = '<li class="print-icon">'
. JHTML::_('link',JRoute::_($url), '<span class="icon-file"></span>&#160;' .$text. '&#160;', $attribs)
.'</li>';
Try to check your code, if nobody didn't do some not working customization on your site.

Jan

Re: PDF Not Generated in J!3.2

Posted: 03 Mar 2014, 17:59
by buddyq
I mentioned above before your post that it does work with SEF turned off. Nobody did any customizations to your component if that is what you're talking about. I'm using multi-language on this site, could there be an issue there?

Re: PDF Not Generated in J!3.2

Posted: 07 Mar 2014, 02:33
by Jan
Hi, this should not be a problem, as you can see in the code, standard JRoute is used there and the format suffix is there. So then there is some problem with SEF settings. Normally it works with SEF, testing now without any problem, the standard SEF normally translates the JRoute link into SEF link :idea:

See e.g. here:
https://www.phoca.cz/joomla3demo/phoca-pdf-demo (the format is there) :idea: Really no idea what can be wrong there :idea:

Jan

Re: PDF Not Generated in J!3.2

Posted: 17 Aug 2014, 16:58
by NicoleRosset
Hello,
Same problem here with Joomla 2.5
The end-part of the link "&format=pdf" is being lost somewhere because of SEF.
Did you find a workaround ?
Thank you very much in advance
Nicole