Command line interface


The command line interface allows the execution of complex and/or repetitive tasks using batch files, scripts, or even high level tools.

This interface is provided by a PDFShellTools.exe file, located at the same directory where the tools are installed. When executed without parameters, will list all the function names it supports. The base command line syntax is as follows:

PDFShellTools.exe function_name /? to get function usage help

PDFShellTools.exe function_name function_parameters to execute the function.

An example of use is as follows:

"C:\Program Files\PDF-ShellTools\PDFShellTools.exe" Merge "C:\My docs\File1.PDF;C:\My Docs\File2.pdf"


All these parameters can also be submitted in an external file, replacing all the parameters by a single "ParamFile=Full\Path\To\Our\Parameters\File" parameter. This is useful when a parameter's' length is higher than the command line maximum number of characters supported by the Windows operating system in use.

C:\Program Files\PDF-ShellTools\PDFShellTools.exe Merge "ParamFile=C:\Temp\Params.txt"

Available functions

Stand alone functions

The next command line functions are not available via the graphical user interface and therefore are standalone functions, available only via the command line. Even so, as with any other command line function, they can also be invoked from the Shell context menu, using the My Tools functionality.

Function name: ConvertImagesToBW (deprecated, replaced by OptimizeImages)
Description: This function converts all the PDF color images to black and white or grayscale. Mostly used to reduce the PDF file size, specially when the images are indeed black and white but where erroneously scanned as color.
Options: [] means optional parameter.
[ColorMode=] The conversion method to use:
  • BW - (default) Converts images to black and white, using Otsu's global level method.
  • BW2 - Converts images to black and white, using adaptive threshold.
  • Grayscale - Converts the images to grayscale.
[OutputPath=] - Full path where to put the converted files. If not specified, the file source path is used instead.
[-CreateBackup] - Creates a backup of the unmodified PDF.
fileslist - List of PDF files to convert; Separate files using the semicolon ";" char. Wildcards supported. Must be the last parameter.
"c:\Program Files\PDF-ShellTools\PDFShellTools.exe" ConvertImagesToBW ColorMode=BW OutputPath=C:\BW_PDFs\ C:\PDFs\*.pdf


(c) 2006-2017 RTT