Phoca PDF Document Author

Phoca PDF - creating PDF documents in Joomla! CMS
JCm21884
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 08 Feb 2015, 21:42

Phoca PDF Document Author

Post by JCm21884 »

When a PDF document is created, certain PDF properties are populated.
* Title - Joomla Article Title
* Subject - Seems to come from the Site Meta Description
* Creator - Phoca PDF
* Author - blank

I believe the Subject could come from the Article's Meta Description, or Keywords.
The Author should come from the Article's Author.

I do not see a way to change any of the above in the Plugin.
I would be fine with an override or even modifying a file (knowing with updates it would need changing).

Thanks.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49161
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca PDF Document Author

Post by Jan »

Hi, in Phoca PDF you can set that the header is fully rendered by Joomla (there we have no option to edit it) or you can add completely your own header. If the first is seleted, unfortunatelly, there is no way to edit it as the full header is loaded from Joomla.

Jan
If you find Phoca extensions useful, please support the project
JCm21884
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 08 Feb 2015, 21:42

Re: Phoca PDF Document Author

Post by JCm21884 »

Jan,

Thanks for the response. I was looking for a way to add the Author to the rendered PDF document Properties and not as a header in the Document.

I did find that adding a $pdf->SetAuthor('The author name'); statement after the $pdf->SetCreator(PDF_CREATOR); (two places) in the phocapdfrender.php file will accomplish this. I know this is hard-coded and will have to be re-edited anytime their is an update. Not being a PHP programmer, I do know the logic of the two locations. :-).

Again, thank you!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49161
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Phoca PDF Document Author

Post by Jan »

OK
If you find Phoca extensions useful, please support the project
henryjamesss
Phoca Newbie
Phoca Newbie
Posts: 4
Joined: 30 Dec 2025, 15:12

Re: Phoca PDF Document Author

Post by henryjamesss »

You’re right about how those PDF properties are currently being populated. With Phoca PDF, most of these metadata fields are automatically pulled from Joomla’s global or article-level settings, and unfortunately the plugin itself doesn’t provide direct configuration options to override them.

Title is taken from the Joomla article title

Subject usually comes from the site meta description (not the article meta description or keywords)

Creator is hardcoded as Phoca PDF

Author being blank is a known limitation, as the article author isn’t mapped to the PDF metadata by default

If you want more control, the only practical options are:

Template override (if the metadata is set there), or

Modifying the Phoca PDF library/helper file where the PDF properties are defined (typically where $pdf->SetTitle(), SetSubject(), SetAuthor() are called).

Just keep in mind that any core file changes will need to be reapplied after updates. Hopefully future versions of Phoca PDF add proper plugin parameters for these fields.
Post Reply