2

I'm using pdftk and the fill_form command to fill in a PDF form from FDF data.

When I execute the command the PDF output is created successfully except that when opening the PDF :

  • A dialog appears in Acrobat reader says "This document contained certain rights to enable special features in Adobe Reader. The document has been changed since it was created and these rights are no longer valid. Please contact the author for the original version of this document."

Can anyone explain why I get the "This document contained ..." dialog and how to get rid of it ?


As some background here's my process.

As a starting point I used Adobes example interactive form from here .

I applied the pdftk command dump_data_fields to establish the names of the input fields in the PDF form and based upon that I then generated a FDF with some sample data as follows using the fdfgen library:

#!python
from fdfgen import forge_fdf
fields = []
fields.append(('Name_Last','Peters'))
fields.append(('Name_First','John'))
fdf = forge_fdf("",fields,[],[],[])
fdf_file = open(".\\dataOut\\adobe-reference-interactiveform_enabled.fdf","w")
fdf_file.write(fdf)
fdf_file.close()

and then I execute the command :

pdftk.exe ".\dataIn\adobe-reference-interactiveform_enabled.pdf" fill_form ".\dataOut\adobe-reference-interactiveform_enabled.fdf" output ".\dataOut\adobe-reference-interactiveform_enabled_PostProcessing1.pdf" flatten verbose
shearichard
  • 1,095
  • 1
  • 17
  • 35

1 Answers1

1

Here's one way

  1. pdftk interactiveform_enabled.pdf fill_form interactiveform_enabled.fdf output flattened.pdf flatten

  2. pdf2ps flattened.pdf flattened_nowarn.ps

  3. ps2pdf flattened_nowarn.ps flattened_nowarn.pdf

acroread flattened.pdf <-- shows the warning

acroread flattened_nowarn.pdf <-- no warning

However note that the flattened_nowarn.pdf will be PDF version 1.4, whereas the original was 1.6, so it may lose stuff. For instance, the sticky notes aren't shown.

The official way to do this is with Adobe Acrobat, but I don't have that so couldn't test it. See http://blog.tangcs.com/2011/09/03/pdf-this-document-contained-certain-rights-to-enable-special-features-in-adobe-reader/

bryce
  • 468
  • 5
  • 23