Command line parameters

PDFCreator.exe

The PDFCreator GUI can receive a list of files as arguments and will try to process the files. The following parameters can be used to influence this.

Note

Most command line parameters were moved to PDFCreator-cli.exe for a better feedback on the result of the calls.

/ManagePrintJobs

PDFCreator will start with the list of print jobs opened. This is useful when using auto-save as PDFCreator will keep all print jobs waiting until you manually continue the conversion. After that, all print jobs are converted automatically.

pdfcreator.exe /ManagePrintJobs "C:\file_a.pdf" "C:\file_b.pdf" "C:\file_c.pdf"

PDFCreator-cli.exe

In addition to the GUI, PDFCreator comes with a command line application that enables you to create documents via the command line interface.

The CLI is always called with a command, e.g. “PrintFile” (without a leading slash), which can have arguments. Arguments are marked with a leading slash (/) or dash (-).

You can get an overview of all command by calling:

pdfcreator-cli.exe help

To receive a list of all arguments for a command, you can add the name of the command to the help command:

pdfcreator-cli.exe help PrintFile

The PDFCreator CLI currently supports the following commands:

InitializeSettings

PDFCreator will initialize the settings (if required) as it would do when doing a regular application start, but exit directly afterwards. The settings will be saved in the registry. This can be used to initialize the current user settings before doing further changes to the settings.

If valid settings already existed, they will not be changed.

Example:

pdfcreator-cli.exe InitializeSettings

RestorePrinters

This will install any PDFCreator printers which have a profile assigned in the PDFCreator settings but aren’t actually installed.

This is mainly useful when using shared or predefined settings. You can now simply run a task containing this command after deploying the PDFCreator settings to ensure all configured printers are present on the user’s system.

Note

Calling RestorePrinters without admin privileges will trigger an UAC dialog.

Example:

pdfcreator-cli.exe RestorePrinters

PrintFile

Prints a single file with the application that is registered in Windows for printing this file type. This call will fail with an exit code if no such application is registered in Windows. This option is useful in combination with auto-save.

You can use this in combination with other parameters, e.g. /Printer, /Profile and /OutputFile.

Warning

The target path and profile set via parameter will be used for the next print job in the queue. If another job is processed by the queue first or multiple prints happen at the same time, the output file might be set for a wrong print job.

The original file name and directory will be available in the Tokens <InputFilename> and <InputFilepath>.

Example:

pdfcreator-cli.exe PrintFile /File="C:\test.doc" /Profile=HighQualityGuid /OutputFile="C:\test.pdf"

Some applications only support printing to the default printer. In this case, PDFCreator has to temporarily change the default printer. Use the parameter /AllowSwitchDefaultPrinter to allow PDFCreator to temporarily switch the default printer.

PrintFiles

PrintFiles works similar to PrintFile, but supports printing multiple files with a single call.

pdfcreator-cli.exe PrintFiles "C:\document 1.doc" "C:\document 2.doc" C:\sample.png

Note

/Profile and /OutputFile are not available, as they only apply the the next print job and PrintFiles will trigger multiple print jobs.

ProcessFile

Adds a single PS or PDF file to the PDFCreator queue. This call will fail with an exit code for other formats, as they can’t be processed directly.

You can use this in combination with other parameters, e.g. /Profile and /OutputFile.

The original file name and directory will be available in the Tokens <InputFilename> and <InputFilepath>.

Example:

pdfcreator-cli.exe ProcessFile /File="C:\test.pdf" /Profile=HighQualityGuid /OutputFile="C:\test-converted.pdf"

MergeFiles

Merges multiple PS or PDF files and add them to the PDFCreator queue. This call will fail with an exit code for other formats, as they can’t be processed directly.

You can use this in combination with other parameters, e.g. /Profile and /OutputFile.

The original file name and directory will be available in the Tokens <InputFilename> and <InputFilepath>.

Example:

pdfcreator-cli.exe MergeFiles /Profile=HighQualityGuid /OutputFile="C:\test-converted.pdf" "C:\file 1.pdf" "C:\file 2.ps"