The command syntax for PDF OPTIMIZER must include:
- the executable name
- the name of the PDF input file you want to compress
- the name you want to assign to the output PDF file
- the name of the profile file
The Windows installation program for PDF OPTIMIZER adds the location of the PDF OPTIMIZER executable to the PATH in the Windows Environment Variables. That means that you can run “pdfoptimizer.exe” from anywhere. For Linux, you need to add the location of the PDF OPTIMIZER executable to your PATH variable.
The command syntax would look like this:
pdfoptimizer input.pdf output.pdf standard.json
You don’t need to include a path name for any of these files as long as the input file and profile are stored in the same directory as the program executable, and as long as you save the output file to the same directory as well.
But you of course might want to draw an input file from one directory and save the output to another. In that event you need to provide the path as well as the file name:
pdfoptimizer C:\Datalogics\OptimizedFiles\AnnualReport2016.pdf C:\Datalogics\OutputFiles\AnnualReport2016-B.pdf standard.json
If any of the file or path names include spaces, use quotes around the name:
pdfoptimizer “C:\Datalogics\Optimized Files\Annual Report 2016.pdf” C:\Datalogics\OutputFiles\AnnualReport2016-B.pdf C:\Datalogics\profiles\images.json