1

I regularly need to create PDFs with fillable form fields that can then be filled using Adobe Reader. However after a lot of research, it seems that the only tools capable of actually adding fillable form fields to PDFs are GUI tools like Acrobat and Foxit, which are also often proprietary. Note that I'm not asking for tools that programmatically fill out those form fields, of which it seems there are many - I'm asking for the inverse.

How can I add fillable form fields to my PDF files programmatically, either via the command line or some other method, such that I can more easily automate the process?

5
  • Do you have a PDF with forms link ? That will be handy to test what is possible or not May 31, 2020 at 20:00
  • Give a try to this perl module: metacpan.org/pod/CAM::PDF Ex: $doc->fillFormFields($name => $value, ...) May 31, 2020 at 20:05
  • @GillesQuenot Unfortunately, the PDFs are sensitive so I can't provide examples. That said there's nothing out of the ordinary about these PDFs so there's no reason why a working solution wouldn't also work on a sample PDF like this or this. Jun 4, 2020 at 20:22
  • @GillesQuenot I may be missing something, but CAM::PDF doesn't seem to have any functionality for creating form fields, just filling them in. Jun 4, 2020 at 20:22
  • Isn't this an oxymoron? You want pdf files fillable by Adobe Reader, which essentially means they must be created with propriety Adobe software. Dec 2, 2021 at 19:17

1 Answer 1

1

If it MUST be "free of cost", you'd have to look around the usual suspects (aka PDF-creating libraries); there may be some solutions available.

Otherwise, the best possible tool (because it has the widest range of JavaScript methods and properties) is Acrobat Pro. Period.

For very simple forms, you might also look at the Forms Design module of LibreOffice (but you still may need Acrobat, even if it is just for debugging your forms).

1
  • I was afraid of Acrobat effectively being the only tool with which this can be done programmatically. Which "PDF-creating libraries" are you referring to? Jun 4, 2020 at 20:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .