fpdm icon indicating copy to clipboard operation
fpdm copied to clipboard

Can not flatten the PDF

Open Avemaar opened this issue 4 years ago • 3 comments

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.

Avemaar avatar Jan 07 '20 17:01 Avemaar

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

You need to have pdftk

dansleboby avatar May 13 '20 13:05 dansleboby

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

imclean557 avatar Jun 04 '20 06:06 imclean557

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

tertek avatar Apr 26 '21 07:04 tertek