PDFMerger icon indicating copy to clipboard operation
PDFMerger copied to clipboard

FPDI Compression problems

Open allstartechsolutions opened this issue 6 years ago • 2 comments

probably uses a compression technique which is not supported by the free parser shipped with FPDI.

It works with some PDF but most of the PDF will throw the error above

allstartechsolutions avatar May 12 '19 23:05 allstartechsolutions

This problem is due to the PDF version, as the error says, the FPDI parser is used to parse the pdfs for merge, but this parser has problems handling pdf versions 1.5 and up, the solution that I found, is to convert or downgrade the pdf files to version 1.4, I do this with ghostscript's ps2pdf14 command, like so:

$path = "Your_path_to_the_pdf"; $pdf_file = "Your_problematic_pdf.pdf"; $pdf_file_version_1dot4 = "pdf_good_for_merge.pdf" $cmd = "ps2pdf14 $path.$pdf_file $path.$pdf_file_version_1dot4; exec($cmd);

This will leave you with a pdf file that is good for merge. I have tested it with pdf versions 1.5 and 1.7, haven't come across a 1.6, but I doubt it wouln't work.

randomhoodie avatar Jul 19 '19 22:07 randomhoodie

I have fetch same issue. please guide how to fix this issue.

bhavesh1992 avatar May 04 '20 11:05 bhavesh1992