Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <GDI.H>
Link against: gdi.lib

Class CPrinterDriver

class CPrinterDriver : public CBase;

Description

Provides access to a store containing printer specification data.

Printer specification data is held as a direct file store, and usually has a .pdr file type.

A printer driver is implemented as two files: a PDR file containing the printer specification data and a PDL file containing the code to link the printer with the graphics printing system.

The printer specification data is generated by compiling a text file (a .pd file type) using the pdrtran tool. Printer specification data defines:

the name of the associated PDL

a list of one or more models supported by this driver, identified by name and UID

device information such as the size of the device, typeface information for each model, including which typefaces are supported, the heights available in each typeface and the width of each character in a font.

Derivation

Members

Defined in CPrinterDriver:

Inherited from CBase:

See also:

Related Topics


Construction and destruction


NewL()

IMPORT_C static CPrinterDriver* NewL();

Description

Constructs, and returns a pointer to a new instance for accessing a printer specification data store.

Return value

CPrinterDriver *

Pointer to the object for accessing a printer specification data store.


~CPrinterDriver()

IMPORT_C ~CPrinterDriver();

Description

Destructor.

It frees all resources owned by the object, prior to its destruction. In particular, it closes the printer specification data store and any open session with the file server.

[Top]


Member functions


OpenPdrL(const TDesC &)

IMPORT_C void OpenPdrL(const TDesC &aName);

Description

Opens the specified printer specification data store.

Parameters

const TDesC16 &aName


Close()

IMPORT_C void Close();

Description

Closes the printer specification data store and frees resources.

An open session with the file server remains open.


NumModels()const

IMPORT_C TInt NumModels() const;

Description

Gets the number of printer models defined by the printer specification.

Return value

TInt

The number of printer models.


Model(TInt)const

IMPORT_C TPrinterModelEntry Model(TInt aNum) const;

Description

Gets the specified printer model.

Parameters

TInt aNum

An index into the list of printer models defined in the printer specification data.

Return value

TPrinterModelEntry

Model specific information.


PrinterDevice()

inline CPrinterDevice* PrinterDevice();

Description

Gets the associated graphics printer device.

Return value

CPrinterDevice *

The physical graphics device used for printing.


CreatePrinterDeviceL(TUid)

IMPORT_C CPrinterDevice* CreatePrinterDeviceL(TUid aModelUid);

Description

Creates the physical graphics device to be used for printing.

Parameters

TUid aModelUid

The UID of a specific model which is defined in the printer specification data.

Return value

CPrinterDevice *

The physical graphics device to be used for printing.


CreatePrinterDriverUIL()

IMPORT_C CPrinterDriverUI* CreatePrinterDriverUIL();

Description

Constructs a printer specific user interface.

The user interface object is optional, but if it exists, it is implemented as part of a UDL (i.e. a UI DLL).

Return value

CPrinterDriverUI *

A pointer to the printer specific user interface, or NULL if there is none.