![Symbian Developer Library](../../../../a_stock/images/mainheading.gif)
![]() |
![]() |
|
class CPrinterDriver : public CBase;
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.
CBase
-
Base class for all classes to be instantiated on the heap.
CPrinterDriver
- Provides access to a store containing printer specification data.
Defined in CPrinterDriver
:
Close()
Closes the printer specification data store and frees resources.CreatePrinterDeviceL(TUid)
Creates the physical graphics device to be used for printing.CreatePrinterDriverUIL()
Constructs a printer specific user interface.Model(TInt)const
Gets the specified printer model.NewL()
Constructs, and returns a pointer to a new instance for accessing a printer spec...NumModels()const
Gets the number of printer models defined by the printer specification.OpenPdrL(const TDesC &)
Opens the specified printer specification data store.PrinterDevice()
Gets the associated graphics printer device.~CPrinterDriver()
Destructor.Inherited from CBase
:
Delete(CBase *)
Deletes the specified object.Extension_(TUint,TAny *&,TAny *)
Extension function operator new(TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TAny *)
Initialises the object to binary zeroes.operator new(TUint,TLeave)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TLeave,TUint)
Allocates the object from the heap and then initialises its contents to binary z...operator new(TUint,TUint)
Allocates the object from the heap and then initialises its contents to binary z...CPrinterDriverUI
Printer specific user interface.IMPORT_C static CPrinterDriver* NewL();
Constructs, and returns a pointer to a new instance for accessing a printer specification data store.
|
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.
IMPORT_C void OpenPdrL(const TDesC &aName);
Opens the specified printer specification data store.
|
IMPORT_C void Close();
Closes the printer specification data store and frees resources.
An open session with the file server remains open.
IMPORT_C TInt NumModels() const;
Gets the number of printer models defined by the printer specification.
|
IMPORT_C TPrinterModelEntry Model(TInt aNum) const;
Gets the specified printer model.
|
|
inline CPrinterDevice* PrinterDevice();
Gets the associated graphics printer device.
|
IMPORT_C CPrinterDevice* CreatePrinterDeviceL(TUid aModelUid);
Creates the physical graphics device to be used for printing.
|
|
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).
|