Please enable JavaScript to view this site.

PDF Image Printer

The run commands can be used to perform an action at three different times:

at the start of the print job

after a successful or failed print

at the end of the print job

Each of these different stages can have more than one command associated with it. Commands are run in the order in which they are set in the profile, and each command runs to completion before the next command is started.

You can run commands from a batch file (.bat), an executable (.exe) or a command (.com). All run command options are controlled through the profile. Some commonly used run commands have been provided in the RunCommands folder in the product installation folder. Users can also create their own run command files (.bat, .exe. or .com) to meet their specific requirements.

Examples of possible run commands include: sending the output file to a document management system, uploading the output file to an FTP server, emailing the user after a failed print, compressing the output file into a zip, or automatically opening a created file.

When a run command for a successful or failed print is executed by PDF Image Printer, the last parameter is always a path to a text file that contains a list of the file(s) created by the conversion process. This text file can contain zero or more lines, with each line being the full path to a file created by PDF Image Printer. You can then use this text file to operate on the files successfully created and the files that failed to convert. The text file is created with UTF-16LE encoding.

All run command options are controlled through the profile. Some commonly used run commands have been provided in the RunCommands folder in the product installation folder. Users can also create their own run command files (.bat, .exe. or .com) to meet their specific requirements.

When using a command from the RunCommands folder under the product setup, the location of the command is stored in the profile using a macro. This allows the profile to work on any computer, no matter where the product is installed. It also allows users the freedom to add their own commands to this folder as part of deployment and they will automatically be found.

These topics cover using the run commands included with PDF Image Printer:

Automatically View the Created File

Execute a Command for Each File Created

Launch an Application or Program

Send Email when File Created

Compress Created File into ZIP

Batch Files for Common Tasks

Run Command Macros

These macros can be used in the command, parameter and starting folder fields. They are automatically expanded to their values when the command is run.

Output Variables

$(FileGUID)

A GUID (Globally Unique Identifier) for this file, this alphanumeric number is unique.

$(JobGUID)

Current job GUID (Globally Unique Identifier) maintained by the driver, this alphanumeric number is unique.

$(JobID)

Current job ID maintained by the driver for this printer. Increments for every print job. This number is shared across all copies of the PDF Image Printer printer and stored as a UInt64 with a maximum value of 18,446,744,073,709,551,615.

$(JobStatus)

1 indicates success, 0 indicates failure

$(OutputDir)

The output directory where the files are created. The directory string is passed in quotes. This macro cannot be used with the PNStart12.exe utility.

$(OutputDirNoQuotes)

Same as $(OutputDir), but without quotation marks. This macro cannot be used with the PNStart12.exe utility

$(PageOrientation)

The orientation of the first page of the output pages, either "Portrait" or "Landscape".

$(PrintJobID)

The job ID from the print queue; this job id increments for every print job. It is not unique and numbers can be repeated.

$(PrintedPageCount)

The number of pages printed.

Date and Time Variables

$(Year)

The year the job was started.

$(Month)

The month the job was started, two digits, 01-12.

$(Day)

The day the job was started, two digits, 01-31.

$(Hour)

The hour the job was started, two digits, 24-hr format, 00-23.

$(Minute)

The minute the job was started, two digits, 00-59.

$(Second)

The second the job was started, two digits, 00-59

Other Variables

$(PrinterName)

Name of the printer that printed the file.

$(Copies)

The number of copies chosen in the print dialog. This number is not used, just passed on as information.

$(Collate)

Any collation settings chosen on the print dialog.

0 if collate was not checked

1 if it was checked

$(Duplex)

Any duplex settings chosen on the print dialog.

1 = No duplex

2 = flip page on long edge

3 = flip page on short edge

$(Color)

The color setting used when printing the document.

1 = Black and White

2 = Color