## Printer Device Driver

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

### User-Interface Features

Before reading this section, we recommend that you read the Adobe Postscript Printer Description Document, version 4.2, to understand the PostScript user-interface (UI) format. In that document, refer specifically to the "User Interface" section.

The UI format gives printers the ability to support specific features that may not be available on other printers. The following is an example taken from the PPD file:

    *OpenUI *PageSize/Paper Size: PickOne

    *OrderDependency: 20 AnySetup *PageSize

    *DefaultPageSize: Letter

    *PageSize Letter/Letter 8.5 x 11: "statusdict /letter get exec"

    *PageSize Legal/Legal 8.5 x 14: "statusdict /legal get exec"

    *PageSize Executive/Executive Envelope: "statusdict/executive get exec"

    *PageSize Monarch/MonarchEnvelope: "statusdict /monarch getexec"

    *CloseUI: *PageSize

Each PPD file may contain a variable number of *OpenUI/*CloseUI groups. The text within each *OpenUI/*CloseUI group is known in this document as a "block" (or a "feature"). Within each block, there are a variable number of options, each one known here as an entry. In the example above,

the UI block is called "PageSize" and covers the text between *OpenUI and *CloseUI.

there are four entries, each named after the UI block name.

the default entry is referenced by the string *Default string followed by the UI block name.

Not only can PPDs contain a variable number of UI blocks, but each block can contain a variable number of UI entries. In addition, there are three types of selections available to a UI block:

PickOne Only one entry in a UI block may be selected at a time.

PickMany One or more entries in a UI block may be selected at a time.

Boolean This is similar to PickOne, but it provides a TRUE/FALSE type selection. In the OS/2 Postscript driver, Boolean values are treated like PickOne values.

In order to support the Postscript UI format, a printer driver must:

support a variable number of UI blocks
support a variable number of UI entries within each block
minimize the amount of overhead as much as possible

Note: All of our OS/2 UI structures are located in PPDIALOG.H.