CPrinterDriver Class Reference

#include <gdi.h>

Link against: gdi.lib

class CPrinterDriver : public CBase

Inherits from

  • CPrinterDriver

    Detailed 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.

    See also: CPrinterDriverUI

    Constructor & Destructor Documentation

    ~CPrinterDriver ( )

    IMPORT_C~CPrinterDriver()

    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.

    Member Function Documentation

    Close ( )

    IMPORT_C voidClose()

    Closes the printer specification data store and frees resources.

    An open session with the file server remains open.

    CreatePrinterDeviceL ( TUid )

    IMPORT_C CPrinterDevice *CreatePrinterDeviceL(TUidaModelUid)

    Creates the physical graphics device to be used for printing.

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

    Returns: The physical graphics device to be used for printing.

    CreatePrinterDriverUIL ( )

    IMPORT_C CPrinterDriverUI *CreatePrinterDriverUIL()

    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).

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

    Model ( TInt )

    IMPORT_C TPrinterModelEntryModel(TIntaNum)const

    Gets the specified printer model.

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

    Returns: Model specific information.

    NewL ( )

    IMPORT_C CPrinterDriver *NewL()[static]

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

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

    NumModels ( )

    IMPORT_C TIntNumModels()const

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

    Returns: The number of printer models.

    OpenPdrL ( const TDesC & )

    IMPORT_C voidOpenPdrL(const TDesC &aName)

    Opens the specified printer specification data store.

    Returns: The name of the printer specification data store. This must be a valid printer specification data store,otherwise the function leaves with KErrNotSupported.

    PrinterDevice ( )

    CPrinterDevice *PrinterDevice()[inline]

    Gets the associated graphics printer device.

    Returns: The physical graphics device used for printing.