Page 1 of 1

No content in PDF

Posted: 20 Feb 2011, 15:48
by JanMalte
Hello together,

I'm using Joomla 1.6 and PhocaPDF. The PDF Link only works at blog layout, where the link to the PDF has the following layout:
http://elmar.malte-gerth.de/aktuell/blo ... =component
On Single Article View the PhocaPDF isn't working well. I get an PDF, but no content is displayed.
http://elmar.malte-gerth.de/aktuell/ter ... =component

I tried to find the problem, but couldn't. Just adding the ID to the link seems not to work:
http://elmar.malte-gerth.de/aktuell/2-w ... =component

Even with disabled sef, mod-write and url-suffix the content isn't generated.

Re: No content in PDF

Posted: 20 Feb 2011, 18:39
by bkleine
hi,

I encountered a similar problem as you did:

I installed today Phoca PDF for Joomla 1.6 and the plugin which is enabled and the control panel of the phoca pdf component works well. I also installed the available fonts. When I enabled PDF icon on some text in my test site a pdf was produced with an header and a footer but without any content. It is obvious that installation is ok, since the header and footer are present and the footer says: Phoca PDF.

btw:
I'm using Joomla 1.6 and PhocaPDF. The PDF Link only works at blog layout, where the link to the PDF has the following layout:
http://elmar.malte-gerth.de/aktuell/blo ... =component
This is not true since the pdf shows only what is shown after the "weiterlesen" (Read More) Marker.

Greetings Bernhard

sef or mod-rewrite do not seem to influence the behaviour. All versions of Joomla and Phoca less than two days old:
designstudy:

http://mtb-active.bkleine-services.com/index.php/team

Re: No content in PDF

Posted: 20 Feb 2011, 22:48
by JanMalte
I found a quick fix. I don't know if this is the right way or even a Joomla Bug. It only works for articles without a read more link. But I'm working on it.
Open components/com_content/views/article/view.pdf.php
and change

Code: Select all

		$document = &JFactory::getDocument();
		$document->setHeader($this->getHeaderText($item, $params));

		echo $item->text;		
		$document->setArticleText($item->article_text);
to

Code: Select all

		$document = &JFactory::getDocument();
		$document->setHeader($this->getHeaderText($item, $params));
		
		$item->article_text = $item->introtext;
		$item->article_text .= $item->fulltext;
		
		echo $item->text;		
		$document->setArticleText($item->article_text);

Re: No content in PDF

Posted: 21 Feb 2011, 17:36
by bkleine
Your changes did not work for me :(

Re: No content in PDF

Posted: 21 Feb 2011, 22:00
by JanMalte
Could you replace

Code: Select all

      $document->setArticleText($item->article_text);
with

Code: Select all

      $document->setArticleText(print_r($item,1));
Afterwards please crate a PDF where no content was displayed and send me the PDF, as it can contain some private information. Visit http://www.malte-gerth.de/kontakt.html for my email address.

Re: No content in PDF

Posted: 05 Apr 2011, 22:35
by arpeggio
Yes this code modification worked for me. It prints simple text but still wont show tables. One step in the right direction thank you.
Any ideas about the tables?