I am using GhostScript to render PDF files to PNG images. However, I have discovered that some PDF's have form fields that contain data (in this case todays date) that I would not like to be present in the output image. Is it possible to disable rendering of field values in GhostScript?
Asked
Active
Viewed 2,154 times
2
-
I have the same issue and can confirm that `-dShowAcroForm=false` doesn't help. I assume that another command includes setting it to true and overrules the decision to set it false. – Natan Aug 27 '22 at 16:44
1 Answers
2
I believe that by default Ghostscript won't render PDF form fields, see: http://ghostscript.com/doc/current/Use.htm#PDF_switches
-dShowAcroForm
Show annotations referred from the Interactive Form Dictionary (AcroForm dictionary).
By default, AcroForm is not enumerated because Adobe Acrobat doesn't do this. This
option may be useful for debugging or recovery of incorrect PDF files that don't
associate all annotations with the page objects.
You may want to set the switch -dShowAcroForm=false
to be sure.
If you're referring to annotations (which are shown by default), you may wish to also set the switch -dShowAnnots=false
.

userx
- 3,769
- 1
- 23
- 33
-
Thank you for your reply! I have tried to set the -dShowAcroForm=false but it did not help. I also tried the -dShowAnnots=false parameter but it would get me an error. The file I am testing with could be found at [link](http://oskarsjoberg.se/v35.pdf). Note how the date in the bottom left on the last page would be rendered presumably with the date the PDF was created. But if you open it in Acrobat Reader it would be an editable field pre-populated with todays date. – Oskar Sjöberg Feb 06 '12 at 15:00