Need Script or Command-Line Tool to Fill in PDF Form

I need a script and/or command-line tool that will fill in a PDF form without ever opening the PDF in the UI. Anyone know of such an animal?

I’ve done extensive searching and found one or two that require MS Windows (typically the .NET framework), but nothing that runs on a Mac.

Any ideas or suggestions?

TIA.

The industry standard for server-side form filling is FDFMerge by Appligent. It used to be available for Mac, but I am not sure about the current situation. You will have to talk to the people there (and give them my regards…).

On the other end of the spectrum, there is a client-side filling method. As a subset of PDF, there is the FDF (Forms Data Format), which is exactly what it says, it is a file format allowing to specify forms data (and some more, but this is not relevant here). FDF is a structured text file, containing field name-field value pairs. In addition, it contains a file reference to the base PDF (in other words, the blank form).

You now can create an FDF, including the path to the base PDF, and send this to the user who will open it in Acrobat/Reader. Acrobat/Reader reads the reference for the base PDF und pulls it in, and fills the form fields. All the user has to do then is saving the filled PDF.

In addition to FDF, there is XFDF, which is essentially an XML-representation of FDF, and works the same way.

For something in-between, you might look what Foxit could provide.

For more programming efforts, there are various libraries around which do support form filling. A leading open source library is iText, a leading commercial library is pdflib.

When it comes to dealing with FDF, feel free to contact me in private if it appears to be beyond the scope of this forum.