0

I am using FPDF and FPDI to make PDF with a pre-uploaded PDF template. In Laravel.

I get the below error when I setSourceFile for to make a new pdf.

ERROR

This PDF document probably uses a compression technique that is not supported FPDI.

$pdf = new \setasign\Fpdi\Fpdi();          
$pdf->addPage();
$pdf->setSourceFile('My-Template-PDF.pdf');

Is there any technique that allows this pdf to be parsed?

or Is there any other way or workaround to parse compressed PDF?

always-a-learner
  • 3,671
  • 10
  • 41
  • 81
  • "_is not supported by the free parser_" sounds like there would be a paid parser that might be able to de-compress. Did you check FPDI's page? – brombeer Sep 01 '22 at 08:57
  • I have the Paid version also but that also not parsing some pdf, i have check on https://www.setasign.com/products/fpdi-pdf-parser/details – always-a-learner Sep 01 '22 at 09:01
  • @brombeer can you suggest any other options to parse the pdf as a template in PHP? I have checked dom-pdf also but they did not allow a template parse. – always-a-learner Sep 01 '22 at 09:02
  • @always-a-learner if you have the paid version this error message will never be thrown. If you have other errors they mostly might be thrown because the PDF is simply faulty. – Jan Slabon Sep 02 '22 at 05:40
  • @JanSlabon yes sir i get what you pointing out, but is there any technique to parse the compressed PDF to use it as a base template in any other library? – always-a-learner Sep 02 '22 at 05:49
  • @always-a-learner you wrote that you "have the Paid version also". Install it correctly and the error message will be gone. – Jan Slabon Sep 02 '22 at 08:20

0 Answers0