## Printer Device Driver

[prev][next][parent][TOC]

### Device Support

PostScript supports many different devices that handle different page sizes , duplexing options, and font availability. The driver requires information for each device it supports so the driver can invoke those features by sending a series of PostScript commands. Information for each device is provided to the driver by means of a PPD file.

A PPD file is a text file that contains PostScript commands for specific device functions. These commands are used to invoke the features of a specific device. PPD files are parsed into binary data that is stored as a resource in the driver. Currently, the PostScript driver supports version-3 PPD files.

A PPD file contains multiple entries, each referring to a specific device feature and matching PostScript commands needed to invoke that feature. A standard PPD entry is broken down into the following format:

    *MainKey [OptionKey][/Translation String]]: Value

where:

*MainKey describes a class of features such as page sizes, duplex options, and fonts. A mainkey always begins with an asterisk. *PageSize, an example of a mainkey, defines types of pages.

OptionKey (optional) identifies a specific option for the feature. If there is more than one option key for each mainkey, a separate entry is needed for each option. For example, several options for *PageSize would be Letter , Legal, and Envelope.

Translation string (optional) clarifies the matching option to the user in simpler terms or in another language. Because each mainkey can have more than one option, it might be necessary to provide some text for each option that the user can understand.

Value will either contain actual PostScript code that is sent to the printer when the feature is selected or a reference to another resource that contains more PPD and PostScript information.

The following is an example of a standard PPD entry:

    *PageSize CommEnv/Business Envelope& "statusdict /commenv get exec"

The mainkey in the above line is *PageSize. The option key is CommEnv. The translation string is Businepss Envelope The value is statusdict /commenv get exec. It is sent to the device when Business Envelope is selected.