Closed tertek closed 11 months ago
@edenst-TPH Danke, das sieht gut aus!
@edenst-TPH hast du das flatten mit pdfTK auch schon ausprobiert?
ja, flatten in pdfTK funktioniert, als separater Befehl oder kombiniert mit fill_form
Sehr schön. Erledigt!
to better know how pdftk works, let us collect all pdfTK commands here:
[x] free: Take a normal PDF with form fields (created in Adobe Acrobat Pro), and make it free
pdftk input.pdf output output.pdf
[x] flatten: Take filled PDF form and flatten it (this means it cannot be changed in form fields anymore):
pdftk filled.pdf output flattened.pdf flatten
Issue: the document gets flattened, but the fields are gone. Solution: It seems like, we need to fill with FDF before we can flatten a filled PDF, see here: https://www.sitepoint.com/filling-pdf-forms-pdftk-php/the flatten cmd worked for me (edenst) with a form manually filled in Acrobat then freed in pdfTK
pdftk input.pdf fill_form fill.fdf output output.pdf flatten
[x] scan: Show all fields of the form, by type, name and maybe other attributes
pdftk free.pdf dump_data_fields
[x] generate fdf file from filled pdf form (will ignore data in image fields)
pdftk 02free_filled.pdf generate_fdf output export/02free_filled_fdf.txt
[x] fill form fields with data from a fdf file (will ignore multiple selection in list box) // re-fill blank pdf
pdftk 02free_blank.pdf fill_form export/02free_filled_fdf.txt output 02free_refilled_flat.pdf flatten
// fill-overwrite acrobat-filled form - works as wellpdftk 02free_filled.pdf fill_form export/02free_filled_fdf.txt output 02free_filled_refilled_flat.pdf flatten