Solaris Common Desktop Environment: Programmer's Guide

Providing the Print Command for Partial Integration

To provide partial print integration, your application must provide a print command line of the form:

print_command[options]-filefilename

where options provides a mechanism for dereferencing none, some, or all of the printing environment variables (see "Desktop Printing Environment Variables" ).

The simplest form of this print command line omits options.

print_command -filefilename

This command line lets users print your application's data files using the desktop printer drop zones. However, printing destination is not set by the drop zone. In addition, other print behaviors set by the environment variables are not implemented. For example, the desktop may not be able to direct silent printing or remove temporary files.

If your print command line provides additional command-line options that correspond to the desktop printing environment variables, you can provide additional integration.

For example, the following command line provides the ability to dereference LPDEST:

print_command
[-d destination] [-filefilename]

where:

destination is the destination printer.

The next print command line provides options for dereferencing all four variables:

print_command [-d destination] [-u user_file_name] [-s] [-e] -filefilename

where:

user_file_name

Indicates the file name as seen by the user. 

-s

Printing is silent (no Print dialog box is displayed). 

-e

Removes the file after it is printed. 

The dereferencing occurs in the action definition. See the section, "Desktop Printing Environment Variables" for more information.