Page 1 of 2

Generate PDF of Article from Link or Button

Posted: 27 Mar 2015, 01:56
by kefford
Hi,

I am sure this has been answered for others, but on searching your forum I could not find. How does one create and view a PDF of a single article, the current one, using a link or button placed on the page. I know how to place the button and the link on the page but how do I trigger the Phoca PDF component to generate the PDF?

The install directions only address how to add the PDF as an additional icon to the PRINT/EMAIL menu under Joomla. I don't use this menu because I do not like the lack of control over positioning. Thanks.

Ken

Re: Generate PDF of Article from Link or Button

Posted: 27 Mar 2015, 16:04
by kefford
Hi,

I think I found the help I need here in this thread,

viewtopic.php?f=37&t=27580

Thanks.

Ken

Re: Generate PDF of Article from Link or Button

Posted: 27 Mar 2015, 16:09
by Jan
Ok

Re: Generate PDF of Article from Link or Button

Posted: 28 Mar 2015, 02:30
by kefford
Ok, I must be missing something. I am using Joomla 3.3.6 and have installed the Phoca PDF component and content plugin. The plugin is enabled. I have also configured the component/plugin as per your directions.

Here is what I have tried to generate the PDF,

1) adding "&tmpl=component&format=pdf" to the URL for the article,
2) adding "&tmpl=component&format=phocapdf" to the URL for the article,
3) adding "&format=pdf" to the URL for the article,
3) adding "&format=phocapdf" to the URL for the article,

None of these are working. Again, I am not interested in using the Joomla Print/Email menu, it is simply too limited. I want buttons placed on my pages using the technique shown on your demo site here,

https://www.phoca.cz/demo/phocapdf-demo

with the small PDF icon that launches this,

https://www.phoca.cz/demo/phocapdf-demo?format=phocapdf

The best result I get is when I use &format=pdf but all I get is the header and footer with no article content. Simply a blank page.

What am I missing? I have gone through your limited documentation, but this technique is nowhere discussed.

Thanks.

Ken

Re: Generate PDF of Article from Link or Button

Posted: 28 Mar 2015, 14:23
by Jan
Hi, blank page mostly means a php error, so you should take a look at your errorLog on your server or enable php error reporting - to get exact information what is wrong there :idea:
https://www.phoca.cz/documents/16-joomla ... rs-on-site
Jan

Re: Generate PDF of Article from Link or Button

Posted: 28 Mar 2015, 15:11
by kefford
Yes, I will do that. But the blank page was generated only by using &format=pdf, which is not Phoca PDF. Why does &format=phocapdf do nothing? My issue is that Phoca PDF is doing nothing. Why?

Re: Generate PDF of Article from Link or Button

Posted: 28 Mar 2015, 15:14
by kefford
Let me clarify, &format=phocapdf does do something, it generates an error as follows,

Error: 500 - View not found [name, type, prefix]: article, phocapdf, contentView

Re: Generate PDF of Article from Link or Button

Posted: 28 Mar 2015, 15:17
by kefford
What should I be using, &format=pdf OR &format=phocapdf? Your documentation says nothing.

Re: Generate PDF of Article from Link or Button

Posted: 28 Mar 2015, 23:23
by Jan
Hi, it is created automatically so this is not described in documentation.

See here in demo:
https://www.phoca.cz/joomla3demo/phoca-pdf-demo
The link is:
joomla3demo/phoca-pdf-demo?tmpl=component&format=pdf

Jan

Re: Generate PDF of Article from Link or Button

Posted: 28 Mar 2015, 23:39
by kefford
Thank you, I will use that link. What is the below demo for?

https://www.phoca.cz/demo/phocapdf-demo

I thought this was the demo for Joomla 3.3 and higher? And that this one,

https://www.phoca.cz/joomla3demo/phoca-pdf-demo

was for Joomla 3 to 3.2 only! At least that is what your documentation says. I am using Joomla 3.3.6.

I will let you know if my debugging of the server PHP errors tells me anything more. Thanks again.

Ken