0

In previous versions of the Zend framework I would do the following:

Zend_Pdf::load('/path/to/pdf.pdf');
$metaAuthor     = $pdf->properties['Author'];
$metaTitle     = $pdf->properties['Title'];
$metaSubject    = $pdf->properties['Subject'];
$metaKeywords   = $pdf->properties['Keywords'];
$metaProducer   = $pdf->properties['Producer'];

It seems that Zend has eliminated Zend_pdf from the framework sometime after version 1.9.

Is there another way to get the same details out of a .pdf file with something other than an old version of the Zend framework? (I'm running PHP 5.4 at this point on RedHat if that makes any difference)

Jason
  • 15,017
  • 23
  • 85
  • 116

1 Answers1

0

There is a standalone version of ZendPdf that you could use. It can be found here:

https://github.com/zendframework/ZendPdf

I mention it because it may be viable solution for you (ie. you get to use what is essentially the old Zend_Pdf but without including the entire framework and with some improvements, like namespaces).

As of two years ago, there was a little bit of trickery required to get it working. I don't know if this advice still applies, but you can read about it here:

Where to get and how to use zend_pdf standalone

I have switched to TCPDF, but I don't think you can extract document properties with it.

Community
  • 1
  • 1
JamesG
  • 4,288
  • 2
  • 31
  • 36