From f68f61dad5fc0827632199a953f8cf35f1927870 Mon Sep 17 00:00:00 2001 From: kamel <kamel@kam> Date: Mon, 26 Jul 2021 16:04:31 +0200 Subject: [PATCH] Ajout fichier test --- test.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test.php diff --git a/test.php b/test.php new file mode 100644 index 0000000..53ae3a3 --- /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"; -- GitLab