PHP library to parse PDF files to text. A wrapper for pdftotext.
Via Composer
composer require wrseward/pdf-parser
Debian / Ubuntu
apt-get install poppler-utils
RedHat / CentOS
yum install poppler-utils
OS X
brew install xpdf
Verify your installation / Get the path of the binary
which pdftotext
$parser = new \Wrseward\PdfParser\Pdf\PdfToTextParser('/usr/bin/pdftotext');
$parser->parse('/path/to/file.pdf');
echo $parser->text();
./vendor/bin/phpspec run