diff --git a/test.php b/test.php new file mode 100644 index 0000000000000000000000000000000000000000..53ae3a3fcaf90cbfdc69ec7484aa6748f24c38da --- /dev/null +++ b/test.php @@ -0,0 +1,17 @@ +<?php + +require_once 'vendor/autoload.php'; + +$pdfFilePath = '/var/www/datanextcloud/ServiceRH/files/dematpayslip/upload/Edition_du_bulletin_de_paie_individuel_385052.pdf'; + +print "Begin\n"; +$pdfParser = new \Smalot\PdfParser\Parser(); +print "Open file\n"; +$pdf = $pdfParser->parseFile($pdfFilePath); +print "Get pages\n"; +$pdfPages = $pdf->getPages(); +$pdfPageNb = count($pdfPages); +if ($pdfPageNb <= 0) { + print "No pages\n"; +} +print "OK\n";