Command-Line Interface (CLI)

About the Command-Line Interface

The Command-Line Interface allows you to run PDFZone from a terminal (ex: Terminal.app). This allows for smooth integration with other softwares. You do not need to run the Graphical User Interface to control the app. Basically, you just need to configure your Models and the extraction zones, then you can run the extraction process from a terminal. This will result in PDFZone producing an output file (CSV) according to your configuration.

Usage

In the terminal (Terminal.app), use the following command pattern:

/Applications/PDFZone.app/Contents/MacOS/PDFZone <config_file.pdfzone> -sourcedir <folder_containing_pdf_files> [-rename] -output <output_file.csv|[rename_directory]>

where:

Example (CSV export) :

/Applications/PDFZone.app/Contents/MacOS/PDFZone /Users/MyUser/Downloads/MyConfig.pdfzone -sourcedir /Users/MyUser/Downloads/pdfFilesToAnalyze/ -output results.csv

Based on the configuration file MyConfig.pdfzone located in the Downloads folder, this command will run the analysis on the PDF files located in the directory /Users/MyUser/Downloads/pdfFilesToAnalyze/ and write the results in the file /Users/MyUser/Downloads/pdfFilesToAnalyze/results.csv

Example (Renaming) :

/Applications/PDFZone.app/Contents/MacOS/PDFZone /Users/MyUser/Downloads/MyConfig.pdfzone -sourcedir /Users/MyUser/Downloads/pdfFilesToAnalyze/ -rename -output renamedFilesFolder

Based on the configuration file MyConfig.pdfzone located in the Downloads folder, this command will run the analysis on the PDF files located in the directory /Users/MyUser/Downloads/pdfFilesToAnalyze/ and copy+rename the PDF files to the directory /Users/MyUser/Downloads/pdfFilesToAnalyze/renamedFilesFolder/

Attention points

For security reasons due to Apple Sandboxing System, the following points should be fullfilled for the Command-Line mode to work properly: