No content in PDF

Phoca PDF - creating PDF documents in Joomla! CMS
JanMalte
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 20 Feb 2011, 15:41
Location: Mannheim
Contact:

No content in PDF

Post 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.
bkleine
Phoca Member
Phoca Member
Posts: 14
Joined: 18 Feb 2011, 09:33

Re: No content in PDF

Post 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
JanMalte
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 20 Feb 2011, 15:41
Location: Mannheim
Contact:

Re: No content in PDF

Post 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);
bkleine
Phoca Member
Phoca Member
Posts: 14
Joined: 18 Feb 2011, 09:33

Re: No content in PDF

Post by bkleine »

Your changes did not work for me :(
JanMalte
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 20 Feb 2011, 15:41
Location: Mannheim
Contact:

Re: No content in PDF

Post 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.
arpeggio
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 05 Apr 2011, 20:20

Re: No content in PDF

Post 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?
Post Reply