Keep a pdf form editable after filling it with pdftk

pdftk flatten
pdftk linux
php fill pdf form

I'm using pdftk to fill a form but the output form isn't editable, when I open it on acrobat reader I'm getting an error message: "This document enabled extended features in Adobe Reader, The document has been changes since it was created and use of extended features is no longer available."

is it possible to keep the document editable?

No. AFAIK for a PDF to be editable in Adobe Reader it has to be digitally signed by Adobe Acrobat. Obviously manipulating a PDF with pdftk changes the PDF so the signature is no longer valid.

Keep a pdf form editable after filling it with pdftk?, I loaded the pdf document into Adobe Acrobat (version 9, don't know if that's relevant) and selected File | Save a Copy. With the new copy I was able to use pdftk  Save Time Editing Documents. No Installation Needed. Try Now! Fast, Easy & Secure. Edit A PDF Online

To get rid of the Adobe digital signuture, just "cat" the signature out of the PDF.

pdftk signed.pdf cat output notsigned.pdf

Filling out PDF Forms with PDFtk and PHP, PDF files can transfer plain/formatted text, images, hyperlinks, and even fillable forms. To keep things simple enough, we'll refer to PDFtk Server as PDFtk throughout To check if it works, we can run the following command: This article focuses on using PDFtk to fill out a standard PDF form using PHP. Upload, Edit, Sign & Export PDF Forms Online. No Installation Needed. Try Now!

I had a pdf document that would generate this error whether or not I would use the "flatten" command when adding the form data.

I loaded the pdf document into Adobe Acrobat (version 9, don't know if that's relevant) and selected File | Save a Copy. With the new copy I was able to use pdftk to add form fields without the error.

Using flatten would produce text. Without flatten I got an editable form in Adobe Reader with data filled in.

pdftk flatten loses fillable field data, I was able to piece together this solution. flattenpdf() { if [[ $# -ne 2 ]] then echo "​Usage: flattenpdf input.pdf output.pdf" return 1 fi temp=$(mktemp) pdftk "$1"  Edit Forms Quickly And Make Any Field Fillable With Text Field/Boxes/Button etc.

Removing flatten will make the form editable.

With flatten Only one input PDF can be given, and it just flattens the output pdf file which makes it uneditable.

syntax :

For editable pdf as output - "passthru("<dir> $pdf_fill $fdf output - "); "

With flatten - passthru("<dir> $pdf_fill $fdf output - flatten ");

How to fill in PDF forms in Adobe Acrobat or Reader, Follow these steps to use Acrobat Reader or Acrobat to fill out Interactive fillable form in Acrobat Reader: Highlight where you should type Save the form on your computer, and then open it directly in Acrobat or Acrobat Reader. In the Auto-Complete Entry List dialog box, do one of the following, and  1) Easily Edit Any PDF Doc Online 2) 100% Free By 5/15 Print & Download Now

PDFtk Server Manual, Filter mode takes only one PDF input and creates a new PDF after applying all of the output options, like pdftk form.pdf fill_form data.fdf output form.filled.pdf If you flatten this form before Acrobat has a chance to create (and save) new field  Filling out PDF Forms with PDFtk and PHP. PDF files are one of the most common ways of sharing documents online. Whether we need to pass our clients’ documents to third-party service providers like banks or insurance companies, or just to send a CV to an employer, using a PDF document is frequently the first option.

Populating PDF Forms with MultiValue Data, Once you have a PDF document with form prompts on it, you can merge the data PDFtk (PDF toolkit) does a number useful things, even before we add our MultiValue magic. I want to keep this article business-practical, so my example will involve filling out a The following command will extract this information for you:. PDF Form filling with FPDF and then Flatten with PDFTK displays un-filled PDF. I'm using the "Form Filling" script from fpdf.org to fill some fields on a PDF Form I created. This appears to work properly. I want the resulting PDF form to be flattened so users can not edit the form fields.

Filling PDF forms with PDFtk, XFDF, and XQuery, I dread the tedium and boredom of filling out a PDF form with tons of fields or but it would save time if you could pre-populate the form with the days of each month. Sid provided the following example, with two fields ( city and state ) (​over 60% in my case), which also makes the form no longer editable:. Fills the single input PDF's form fields with the data from an FDF file, XFDF file or stdin. Enter the data filename after fill_form, or use -to pass the data via stdin, like so: pdftk form.pdf fill_form data.fdf output form.filled.pdf After filling a form, the form fields remain interactive unless you also use the flatten output option.

Comments
  • Remove the 'flatten' flag and it should still be editable. I just successfully did a form_fill with a fdf file and it didn't break anything in the pdf.
  • Acknowledging that this question and answer are now five and a half years old, things seem to have changed since this answer was given. It is now possible to maintain a PDF's editability status using pdftk - see Marco's answer.
  • This not only removed the "extended features" message for me for PDFs that are being processed using pdftk's fill_field, but it also fixed an issue with some of those filled PDFs showing up blank in Acrobat Pro. Furthermore, the PDFs seem to be playing nicer with Preview (e.g. preview is not auto-resizing those fields) bringing its rendering in line with that of the official Adobe products.IMO this should be the accepted answer.
  • Removing the flatten attribute will not make the output file editable in Acrobat Reader