Rohit Kumar
Rohit Kumar

Reputation: 45

Is it possible to get metadata from pdf file using php/ jsp

Actually I'm trying to get the date of creation, author, title, last modified date etc from pdf which will be uploaded to the server and then store these metadata value into the database. Is there any simple implementation to do it which will be applicable for all pdf files.

Upvotes: 0

Views: 409

Answers (1)

Akshat Singhal
Akshat Singhal

Reputation: 1801

Use the Zend_pdf Framework:

$pdf = Zend_Pdf::load($pdfFilePath);

echo $pdf->properties['Title'] . "\n";
echo $pdf->properties['Author'] . "\n";

Limitation: Works only on unencrypted files smaller than 16MB.

Upvotes: 1

Related Questions