Reputation: 45
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
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