Command Line Parameters

The printer driver can start an application before or after printing. This can be set by checking the “Start Application” checkbox, or programmatically set the BLF_LAUNCHAPP flag in the LaunchFlags member of the devmode of the printer.

 

If the driver is configured to launch the application after the printing and the ‘Pass Parameters’ checkbox is checked. the parameters are passed in the command line to the application.

 

The order of the parameters passed to the started application can be changed, and unnecessary parameters can be removed from the parameter list.

 

The passed parameters are separated by a space character. The string type parameters are between quotes. The following parameters are passed by the driver:

 

Document name

-STRING

Group file name

-STRING

Printer name

-STRING

Number of pages

-NUMBER

Multipage

-NUMBER, the value is 1 or 0. The 1 means  the image is multipage, 0 the image is not multipage

Orientation

-NUMBER, the value is 1 or 0. The 1 means  the image orientation is portrait, 0 the image orientation is landscape.

Custom

-STRING

Output file name

-STRING

 

Example:

           MyApp.exe “Document” “Document.grp” “Black Ice Color” 4 0 1 ProcessFile “Document.doc”

 

Notes:

The “Start After Printing” option does not have an explicit flag, the application is started after printing, if neither the BLF_STARTBEFOREPRINT nor the BLF_STARTFORMESSAGING flag is set. E.g.:

 

Start after printing

=

“LaunchFlags=13” will start the application after printing (13 = BLF_LAUNCHAPP + BLF_PASSPARAMETERS + BLF_STARTNORMAL)

 

Start t before printing

=

“LaunchFlags=15” will start the application before printing (15 = BLF_LAUNCHAPP + BLF_PASSPARAMETERS + BLF_STARTNORMAL + BLF_STARTBEFOREPRINT)

 

“Start for messaging

=

“LaunchFlags=141” will start the application for messaging (141 = BLF_LAUNCHAPP + BLF_PASSPARAMETERS + BLF_STARTNORMAL + BLF_STARTFORMESSAGING)