Additional command line options and response files

Define the overwrite mode

--overwrite 

New files override existing files with the same name (applies to report files and to created PDF files).

Set the result path

  • Note: If neither an output path nor an output folder is defined, any result will be created next to the input file (default: input file name with suffix _PDFA or _NOPDFA, will be indexed if necessary).
  • Note: The use of --outputfile together with --outputfolder is not sup-­ported within one CLI call.

Path to output file

-o --outputfile=<path> 

Defines the absolute path of the destination file. The parent folder must exist.

  • Consult section "Results" to see if a new file was created.
    When running a profile containing checks only, no new output file is created.

Parameters

path

absolute path to output file

Set an output folder

-f --outputfolder=<path> 

Defines an absolute path to a folder where the resulting files of an execution are stored.

If neither an output path nor an output folder is defined any result will be created next to the input file (filename will be indexed if necessary).

The use of --outputfile together with --outputfolder is not supported within one CLI call.

Parameters

path

absolute path to output folder Out-­put file

Timestamp

--timestamp 

Every line in the Standard output (stdout) is prefixed using a time stamp.

Using response files

To keep the command line call structured and straightforward, pdfToolbox CLI supports the usage of response files. These offer the possibility to define each command line switch line by line and also add some comments.
Please make sure the response file is saved as UTF-8 (without BOM).

Example
Response file variables.rsp:

###################
# Check for specified resolution and change name of Check
#
--setvariable=RESOLUTION:300
--setvariable=CHECKNAME:Image resolution for images
#
###################
# EOF

Using different responsefiles enables the easy definition of own, localized sets of strings for names of Profiles, Fixups and Checks as well as different settings for processing PDFs for different output environments.

Command line call:

pdfToolbox @<absolute path to "variables.rsp"> <profile> <PDF file>

If command line arguments or options with space characters are used in the response file, they shall not be escaped or set in quotes as normally used in CLI commands, where it would e.g. look like: --setvariable=CHECKNAME:"Image resolution for images" 

"var/Profiles/PDF analysis/List page objects, grouped by type of object.kfpx"

or

var/Profiles/PDF\ analysis/List\ page\ objects\,\ grouped\ by\ type\ of\ object.kfpx

You can also reference files, e.g. Profiles directly from the response file (you have to use the correct path to the correct location or course).
Like explained above, the correct syntax in a response file has to look like:

###################
# Check for specified resolution and change name of Check
#
Resolution of color and grayscale images is less than specified value.kfpx
--setvariable=RESOLUTION:300
--setvariable=CHECKNAME:Image resolution for images
#
###################
# EOF

Command line call:

pdfToolbox @<absolute path to "variables.rsp"> <PDF file>

You'll find a sample Profile (with the Variables used above) here:

Additional notes

  • It is possible to use multiple response files within one CLI call.
  • You can also add other command line parameters to the response file.
  • The order of the content and the order of the response files will define the final order of all options and commands for the CLI call.
  • Limitations with regard to the maximal length of a command line call can thus be avoided.