codeshell / fpdm

PDF form filling using FPDM Class written by FPDF author Olivier (+multifile-filling-fix, +checkboxes)
MIT License
114 stars 66 forks source link

Can not flatten the PDF #23

Open Avemaar opened 4 years ago

Avemaar commented 4 years ago

I generate a new PDF with the filled data but Firefox can not render it correctly so i tried to flatten the PDF so i used:

$pdf = new FPDM('pattern.pdf'); $pdf->Load($fields, true); // second parameter: false if field values are in ISO-8859-1, true if UTF-8 //$pdf->Flatten(); $pdf->Merge(); $pdf->Output();

command which make unreadable the pdf in every platform.

dansleboby commented 4 years ago

flatten field data as text and remove form fields (NOT YET SUPPORTED BY FPDM)

You need to have pdftk

imclean557 commented 4 years ago

It's supported by fpdm if you have pdftk, but it would be nice to have it as pure PHP.

tertek commented 3 years ago

I have installed pdftk but still$pdf->flatten not working. Anyone else having this experience?

dskurth commented 1 day ago

Having the same problem. The call crashes the page. Seems to make the PDF file a ""call"

Fatal error: Uncaught Error: Call to undefined function