Generate PDF of Article from Link or Button

Phoca PDF - creating PDF documents in Joomla! CMS
kefford
Phoca Member
Phoca Member
Posts: 19
Joined: 07 Mar 2014, 06:19

Generate PDF of Article from Link or Button

Post 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
kefford
Phoca Member
Phoca Member
Posts: 19
Joined: 07 Mar 2014, 06:19

Re: Generate PDF of Article from Link or Button

Post by kefford »

Hi,

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

viewtopic.php?f=37&t=27580

Thanks.

Ken
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Generate PDF of Article from Link or Button

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
kefford
Phoca Member
Phoca Member
Posts: 19
Joined: 07 Mar 2014, 06:19

Re: Generate PDF of Article from Link or Button

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Generate PDF of Article from Link or Button

Post 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
If you find Phoca extensions useful, please support the project
kefford
Phoca Member
Phoca Member
Posts: 19
Joined: 07 Mar 2014, 06:19

Re: Generate PDF of Article from Link or Button

Post 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?
kefford
Phoca Member
Phoca Member
Posts: 19
Joined: 07 Mar 2014, 06:19

Re: Generate PDF of Article from Link or Button

Post 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
kefford
Phoca Member
Phoca Member
Posts: 19
Joined: 07 Mar 2014, 06:19

Re: Generate PDF of Article from Link or Button

Post by kefford »

What should I be using, &format=pdf OR &format=phocapdf? Your documentation says nothing.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 47870
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Generate PDF of Article from Link or Button

Post 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
If you find Phoca extensions useful, please support the project
kefford
Phoca Member
Phoca Member
Posts: 19
Joined: 07 Mar 2014, 06:19

Re: Generate PDF of Article from Link or Button

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