Overview
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"
Notes:
- Whenever a space appears in a parameter/content, there is the need to "double quote" that parameter and its content, e.g. "parameter=some spaced text"
- When the parameter/content has a double quote character, this double quote needs to be escaped with a backslash character, e.g. "parameter=some \"quoted text\""
- When the parameter content ends with a backslash, and needs to be double quoted because it has space characters, this final backslash must be escaped with an additional backslash, e.g. "parameter=C:\My Documents\\"
- When specifying multiple files, the list must use the semicolon ( ; ) character as separator, e.g.file1.pdf;file2.pdf;file3.pdf
- The wildcards * and ? are also supported to specify source files, e.g. c*.pdf;Img??9.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:
|
[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. |
Example: "c:\Program Files\PDF-ShellTools\PDFShellTools.exe" ConvertImagesToBW ColorMode=BW OutputPath=C:\BW_PDFs\ C:\PDFs\*.pdf |