I'm looking for a tool that I can run from CMD to export or import the .fdf annotations file giving it the path of the .pdf file through CMD.

Price: Any
Openness: Open Source (preferable)
OS: Windows 10


PDFtk Server should do what you want to do.

Here are the relevant parts from their Manual:


Reads a single input PDF file and generates an FDF file suitable for fill_form. It saves this FDF file using the output filename. If no output filename is give, it outputs the FDF to stdout. Does not create a new PDF.

fill_form < FDF data filename | XFDF data filename | - | PROMPT >

Fills the single input PDF’s form fields with the data from an FDF file, XFDF file or stdin. Enter the data filename after fill_form, or use - to pass the data via stdin, like so:

pdftk form.pdf fill_form data.fdf output form.filled.pdf

If the input FDF file includes Rich Text formatted data in addition to plain text, then the RichText data is packed into the form fields as well as the plain text. Pdftk also sets a flag that cues Reader/Acrobat to generate new field appearances based on the Rich Text data. So when the user opens the PDF, the viewer will create the Rich Text fields on the spot. If the user’s PDF viewer does not support Rich Text, then the user will see the plain text data instead. If you flatten this form before Acrobat has a chance to create (and save) new field appearances, then the plain text field data is what you’ll see in the flattened PDF.


In case you can't find a CLI, making your own CLI is often trivial. Just need to find an SDK that can import/export FDF, and then "wrap". The company I work for offers such an SDK, though requires licensing. Using our SDK you could create a native binary CLI, or a Java/C#/Python one, and then call that CLI anyway you like.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.