Tutorials
Command Line Syntax
The command syntax for PDF Forms Flattener must include:
The command syntax for PDF Forms Flattener must include:
| Command | Description |
|---|---|
PDFFormsFlattener | Executable file name |
-i [--input] | Path to the PDF form input document |
-o [--output] | Path to where the output file will be saved. For flattening, this file must have the extension .pdf. For XFA data export, use .xdp, .xfd, or .xml. For AcroForm data export, use .xfdf, .fdf, or .xml. |
You can also add two optional values:
| Option | Description |
|---|---|
-d [--import] | Path to the forms input data file. Use this to import data into blank fields on a PDF form document. For XFA documents, use .xdp, .xfd, or .xml. For AcroForm documents, use .xfdf, .fdf, or .xml. |
-f [--flatten] | Set the flattening option: true (default — flatten the document), skip (skip flattening), or asprinted (flatten as if printed). |
-c [--convert] | Convert XFA fields to AcroForm fields. |
For each command line option, you can use the short (-i) or long (--input) notation.
A basic command statement looks like this:
PDFFormsFlattener --input XFDDocument.pdf --output Flattened_output.pdf --import datafile.xdp
If you need to reference files across different directories, include full paths:
PDFFormsFlattener --input C:\Datalogics\InputFiles\XFADocument.pdf --output C:\Datalogics\FlattenedFiles\Flattened_output.pdf
If any file or path names contain spaces, wrap them in quotes:
PDFFormsFlattener --input "C:\Datalogics\Optimized Files\XFADocument.pdf" --output C:\Datalogics\FlattenedFiles\Flattened_output.pdf
The Windows installer adds the PDF Forms Flattener executable to
%PATH%, so you can run it from any directory without specifying its full path.