This library depends on poppler utils which can be installed by the following.
Debian / Ubuntu
apt install poppler-utils
apt install ghostscript
OSX
brew install poppler
composer require 3ws-internet-oplossingen/pdf-tools
Gather all information about a PDF file like Page count.
$pdf = new ThreeWS\PdfTools\Info('location_to_pdf.pdf');
var_dump($pdf->toArray());
Convert a PDF page to a JPG file.
$pdf = new ThreeWS\PdfTools\Jpg('location_to_pdf.pdf', 60, 'y');
var_dump($pdf->convert());
Convert a PDF file with multiple pages into multiple single page PDF's using a pattern with replacement of %d.
$pdf = new ThreeWS\PdfTools\Separate('location_to_pdf.pdf', 'location_to_paged_%d_pdf.pdf');
Extract Text from a PDF file.
$pdf = new ThreeWS\PdfTools\Text('location_to_pdf.pdf');
var_dump($pdf->convert());