php-pdf-merge icon indicating copy to clipboard operation
php-pdf-merge copied to clipboard

Problem with pdf version >=1.4

Open pippuccio76 opened this issue 2 years ago • 1 comments

Hi , sorry fo english , when i try to merge file with 1.4 version i have an exception :

Unknown HTTP status code provided with no message: 267

pippuccio76 avatar May 03 '22 20:05 pippuccio76

The free version of one of the dependancies FPDI only allows processing PDF files up to version 1.4. You can use GHOSTSCRIPT to convert any PDF file to version 1.4 before processing it with FPDI.

$gsCmd = 'gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dNOPAUSE -dBATCH -sOutputFile="' . $newFile . '" "' . $currentFile . '"';
 exec($gsCmd);

Ross-C avatar Sep 25 '22 07:09 Ross-C