## Printer Device Driver

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

### Primary Structures

Although the driver uses many structures, there are one buffer and three structures that are primary to the driver's function:

PostScript Command Buffer This buffer contains the actual strings retrieved from the PPD file. These include the translation strings that are displayed in the dialog box.

This buffer is accessed by a base pointer. This base pointer can be accessed by apResources[ RESBUF ], by the DESPPD structure, or by the dialog header when Printer Properties and Job Properties are displayed ( DLGHDR.pIemsBuff).

DESPPD structure (located in PPDIALOG.H) This contains the data take from the PPD structure. This is the only structure that is used by PPD compiler. Most fields contain an offset value that, when added to the base pointer to the PostScript Command buffer, will yield an address to the desired data. One access to this structure is through apResources[ PPDRES ].

This contains the following:

The PostScript command strings that are sent out to the job. These command strings include such things as which paper size to use, the input slot from which to pull the paper, etc.

The UI structure (UI_LIST).

There is a pointer called pPSStringBuff that points to the PostScript Command buffer.

CNFDATA structure (located in PPDIALOG.H) The CNFDATA structure contains the current settings specified by the user in Job Properties and Printer Properties. This includes such things as whether the user specified portrait or landscape printing. One access to this structure is through apResources[ CNFRES ].

DV structure (located in PRDPTYPT.H) This structure is passed along with the the PDDC that is sent along with the job. Any data that is to be used during a job may be stored in the structure. The data is passed to the DV structure in the prde_FillPdb function.