Additional command line options and response files

Quick processing

-q --quick 

Processing is stopped after the first detection of an error in the corrected PDF (only applied if no report is generated).

Define the overwrite mode

--overwrite 

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

Create output files only for successful conversion

--onlypdfa 

Create an output file only if the file could be converted to PDF/A.

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.

  • Note: Consult section "Results"to see if a new file was created.

Parameters

path

absolute path to output file

Path to 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

Use an additional profile

--profile 

Run additional checks and fixups by defining a full path to a kfp or kfpx file (exported from pdfToolbox  /  pdfaPilot Desktop or Preflight in Adobe Acrobat). The input file is converted if no warnings or errors occur.

Using response files

To keep the command line call structured and straightforward, pdfaPilot 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 analyze.rsp:

###################
# PDF/A analysis
# with additional Profile for checking the image resolution, where the resolution and the name of the Check can be adjusted dynamically
#
--analyze
--profile=<Path to Profile file>
--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 Custom Fixups and Custom Checks as well as different settings for processing PDFs for different output environments.

Command line call:

pdfaPilot @<absolute path to "analyze.rsp"> <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:

###################
# PDF/A analysis
# with additional Profile for checking the image resolution, where the resolution and the name of the Check can be adjusted dynamically
#
--analyze
--profile=Resolution of color and grayscale images is less than specified value.kfpx
--setvariable=RESOLUTION:300
--setvariable=CHECKNAME:Image resolution for images
#
###################
# EOF

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.

0 Kommentare

Geben SIe Ihren Kommentar ein

E-Mail senden, wenn jemand auf diesen Kommentar antwortet