Using Quick Fix on the command line

On the command line (CLI), pdfToolbox provides the possibility to run a QuickFix without loading the whole pdfToolbox executable, instead, only the part of pdfToolbox is loaded and executed that carries out a QuickFix. This results in significantly shorter launch times. In addition, at least when used/configured accordingly, no files are copied or completely rewritten, again reducing processing time.

In the simplest case, a call on the command line would look like this:

./pdfToolbox --quickfix my_quickfix_config.json my_pdf_file.pdf
Click to copy

Use ./pdfToolbox --help quickfix on the command line for more information (though all other parameters for quickfix are generic pdfToolbox parameters and not specific to QuickFixes).

The second parameter – called my_pdf_file.pdf in the example – specifies the PDF file to process. It is intentional in the example, that no output file is specified. Instead, the original file will be modified (in thee form of an incremental update). This guarantees to fastest possible execution. If an output PDF file is specified, the original PDF will first be copied to the destination, and than that copy of the PDF file be processed 'in situ'.

The first parameter – called my_quickfix_config.json in the example, contains a JSON expression defining the QuickFix instructions to be carried out. The syntax for each QuickFix feature is shown in the article QuickFix features.

Use "Log profile execution" to capture a JSON representation of a QuickFix in pdfToolbox Desktop

The easiest way to construct a QuickFix configuration file as a JSON expression is to create a ProcessPlan with a QuickFix step in pdfToolbox Desktop. Running that Process Plan with "Log profile execution" turned on, the log output will also contain th QuickFix definition as a JSON file: