Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

Creating Desktop Printing for a Data Type

Desktop printing provides these ways to print a data file:

In addition to desktop printing, many applications provide a way to print from within the application.

Desktop printing uses actions named Print. Print, like Open, is an action name that is used for many different types of data. Therefore, Print actions use action mapping and the ARG_TYPE field to customize printing for each data type.

For example, here is the Print action for the XWD data type. The definition is located in /usr/dt/appconfig/types/language/xclients.dt:

ACTION Print
 {
 	LABEL					Print
 	ARG_TYPE				XWD
 	TYPE					MAP
 	MAP_ACTION			NoPrint
 }

This Print action, specific to XWD files, is mapped to a NoPrint action. NoPrint is a special action defined in /usr/dt/appconfig/types/language/dt.dt. The NoPrint action displays a dialog box telling the user that this data type cannot be printed.

Compare the XWD Print action with the following Print action for PCL files:

ACTION Print
{
 	LABEL				Print
 	ARG_TYPE			PCL
 	TYPE				MAP
 	MAP_ACTION		PrintRaw
 }

The PrintRaw action, defined in the configuration file /usr/dt/appconfig/types/language/print.dt, contains the command line for printing the PCL files.

ACTION PrintRaw
 {
 	TYPE						COMMAND
 	WINDOW_TYPE				NO_STDIO
 	EXEC_STRING				/usr/dt/bin/dtlp -w %(File)Arg_1%
 }