1

I've a huge amount of PDF files, and I need to determine programmatically which ones are fillable and which ones are not (because of the PDF security options). Is there any way to do that?

So far the best solution I've tried is a batch script based on pdftk, as suggested here: https://stackoverflow.com/a/4396189/112934. This way, I've discarded all the non password-protected files. But I've found some PDFs that, despite being password protected, are fillable.

Any ideas? I don't mind writing a small Java application if there is some easy to use API, but I'd prefer a batch script...

PS: just to clarify - what I need to determine is whether the "Filling form of fields" security option is set to "Allowed" or "Not allowed".

Community
  • 1
  • 1
AJPerez
  • 3,435
  • 10
  • 61
  • 91
  • 1
    It'll be set in the root object. Look at the end of the PDF file for where it referenced the root object. Then jump to there, and compare what that looks like for one with fillable to one not fillable. – Alasdair Jan 19 '12 at 08:35
  • The root object? But how do I "open" the PDF file? Should I read it as if it were a plain text file? – AJPerez Jan 20 '12 at 08:12
  • Try using Notepad++ – dev1998 Dec 16 '22 at 21:55

0 Answers0