Command Syntax
The command syntax for PDF Checker includes these values:
Required:
- The executable name:
pdfchecker -i [--input]— name and path of the PDF input file to review-j [--profile]— name and path of the JSON profile file
Optional:
-o [--output]— name and path to assign to the output results file-s [--json-output]— name and path to assign to a JSON output results file-p [--password]— password needed to open a protected PDF input file-n [--nopath]— remove the system paths to the input PDF or JSON file from the output
For each command line option, you can use either the short -i or long --input notation. The only value that does not require a matching argument is --nopath.
The basic command syntax looks like this:
pdfchecker --input test.pdf --profile everything.json
This tells PDF Checker to inspect test.pdf using the JSON profile everything.json. Results are displayed on the command line by default.
To export results to an output file, use the --output option. PDF Checker supports two kinds of output files:
- Text file (
.txt) — human-readable - JSON file (
.json) — machine-readable, suitable for batch processing
The available output combinations are:
- Display the text report to the console (default)
- Save the text report to a file
- Display the JSON report to the console
- Save the JSON report to a file
- Save both text and JSON reports to files
- Display JSON to the console and save text to a file
- Display text to the console and save JSON to a file
The full command syntax with all options:
pdfchecker --input test.pdf --profile everything.json --json-output PDFChecker_results.json --password mypassword --nopath
To display JSON output on the console instead of saving it to a file, use - as the filename:
pdfchecker --input test.pdf --profile everything.json --json-output -
Create both a text and JSON output file at the same time:
pdfchecker --input test.pdf --profile everything.json --json-output PDFChecker_results.json --output PDFChecker_results.txt
Display JSON on console while saving the text output to a file:
pdfchecker --input test.pdf --profile everything.json --json-output - --output PDFChecker_results.txt
Display text on console while saving JSON output to a file:
pdfchecker --input test.pdf --profile everything.json --output - --json-output PDFChecker_results.json
If your input file or profile lives in a different directory from the executable, include the full path:
pdfchecker --input C:\Datalogics\CheckerFiles\AnnualReport2016.pdf --profile everything.json --output C:\Datalogics\PDFChecker_results.txt
If any path contains spaces, wrap it in quotes:
pdfchecker --input C:\Datalogics\CheckerFiles\AnnualReport2016.pdf --profile everything.json --output "C:\Datalogics\PDFChecker results.txt"
You can also provide a path for the JSON profile file:
pdfchecker --input C:\Datalogics\CheckerFiles\AnnualReport2016.pdf --profile C:\Datalogics\JSONProfiles\everything.json --output C:\Datalogics\PDFChecker_results.txt
--profile, PDF Checker will look for the file in the CheckerProfiles folder in the installation directory first. This means you can often just use the filename directly: --profile everything.json%PATH%, so you can run pdfchecker.exe from any directory without specifying its path.