Reading PDF metadata in PHP
The Zend framework includes Zend_Pdf, which makes this really easy:
$pdf = Zend_Pdf::load($pdfPath);
echo $pdf->properties['Title'] . "\n";
echo $pdf->properties['Author'] . "\n";
Limitations: Works only on files without encryption smaller then 16MB.
PDF Parser does exactly what you want and it's pretty straightforward to use:
$parser = new \Smalot\PdfParser\Parser();
$pdf = $parser->parseFile('document.pdf');
$text = $pdf->getDetails();
You can try it in the demo page.