1. Quick Introduction to the Command Line Interface

In order to run PDFreactor from the command line, please make sure that a JRE is installed (you can find the minimum requirements in the readme file). To verify that the JRE is installed properly and see the current version just type the following command in your shell:

java -version

This should result in an output similar to the following:

C:\>java -version
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

In order to run PDFreactor, you must use java with the jar option:

java -jar pdfreactor.jar

The "-h" option of PDFreactor will display an overview of all available command line options:

java -jar pdfreactor.jar -h

All of these sample instructions assume that you are currently in the same directory as pdfreactor.jar file.

Generating PDF documents. In the simplest case, PDFreactor only needs two parameters to generate a PDF file: the input and the output file:

java -jar pdfreactor.jar <input file> <output file>

For example:

java -jar pdfreactor.jar c:\test\test.html c:\test\test.pdf

Instead of an input file you can also specify a URL:

java -jar pdfreactor.jar http://www.myserver.com/mytestfile.xml myfile.pdf

Note:

The directory separator is different for each platform. On Windows it is "\" whereas under Linux and Mac OS it is "/".

java -jar pdfreactor.jar /user/home/testuser/test.xml test.pdf

Note:

Paths to files which contain whitespaces must be surrounded with quotation marks:

java -jar pdfreactor.jar "c:\documents and settings\user\test.html" test.pdf