diff -r ae94777fff8f -r 59758314f811 Symbian3/PDK/Source/GUID-A1F0D18B-5A89-58FC-9361-7B0A9786C826.dita --- a/Symbian3/PDK/Source/GUID-A1F0D18B-5A89-58FC-9361-7B0A9786C826.dita Fri Jun 11 12:39:03 2010 +0100 +++ b/Symbian3/PDK/Source/GUID-A1F0D18B-5A89-58FC-9361-7B0A9786C826.dita Fri Jun 11 15:24:34 2010 +0100 @@ -1,58 +1,57 @@ - - - - - -pdrstore: -Creating a Printer Driver using pdr files -
Description

This example demonstrates how to load -printer driver information files and create a printer driver. The purpose -of the PdrStore API is to:

    -
  • Provide access to the -printer driver information contained in .pdr files for -applications to build a printer driver list

  • -
  • Load and create an appropriate -printer driver for a given printer.

  • -

During initialisation, the example first loads the printer driver, -then creates a session with the font and bitmap server. This is detailed in -the following sections.

-
Download

Click -on the following link to download the example: PDRStore.zip

Click: browse to view the example code.

-
Create a printer driver void CPdrExample::CreatePrinterDriver()

This function provides the following funtionality:

    -
  • Opens a printer driver -information (.pdr) file using CPrinterDriver::OpenPdrL()

  • -
  • Gets the total number -of driver models available using CPrinterDriver::NumModels()

  • -
  • Creates a printer device -using CPrinterDriver::CreatePrinterDeviceL().

  • -
-
Display the supported typefaces void CPdrExample::DisplayTypefaces()

Gets the list of supported typefaces using CPrinterDevice::TypefaceSupport() and -displays them.

-
Create a printer control void CPdrExample::CreatePrinterControl()

Creates a printer control using CPrinterDevice::CreateControlL().

-
Preparing for printing void CPdrExample::PrintPages()

This function prepares the printer driver for printing the pages. It -involves the following:

    -
  • Gets the number of bands -per page using CPrinterControl::BandsPerPage()

  • -
  • Gets each band to be -printed using CPrinterDevice::QueueGetBand()

  • -
  • Creates a graphic context -using CPrinterDevice::CreateContextL() to draw

  • -
  • Terminates the print -process using CPrinterControl::QueueEndPrint() when no -more bands are available.

  • -
-
Class Summary

CPrinterDevice

CPrinterControl

CPrinterDriver

CGraphicsContext

-
Usage

This is a console application, so does not -have a GUI. It builds an executable called pdrstoreexample.exe in -the standard location (\epoc32\release\winscw\ <build_variant> for -CodeWarrior). The Symbian -platform build process describes how to build this application. After -launching the executable, depending on the emulator you are using, you may -need to task away from the app launcher/shell screen to view the console.

+ + + + + +pdrstore: Creating a Printer Driver using pdr files +
Description

This example demonstrates +how to load printer driver information files and create a printer +driver. The purpose of the PdrStore API is to:

    +
  • Provide access +to the printer driver information contained in .pdr files for applications to build a printer driver list

  • +
  • Load and create +an appropriate printer driver for a given printer.

  • +

During initialisation, the example first loads the printer +driver, then creates a session with the font and bitmap server. This +is detailed in the following sections.

+
Download

Click on the following link to download the example: PDRStore.zip

Click: browse to view the example code.

+
Create a printer driver void CPdrExample::CreatePrinterDriver()

This function provides the following funtionality:

    +
  • Opens a printer +driver information (.pdr) file using CPrinterDriver::OpenPdrL(const TDesC&)

  • +
  • Gets the total +number of driver models available using CPrinterDriver::NumModels() +const

  • +
  • Creates a printer +device using CPrinterDriver::CreatePrinterDeviceL(TInt).

  • +
+
Display the supported typefaces void CPdrExample::DisplayTypefaces()

Gets the list of supported typefaces using CPrinterDevice::TypefaceSupport(TTypefaceSupport +&,TInt) const and displays them.

+
Create a printer control void CPdrExample::CreatePrinterControl()

Creates a printer control using CPrinterDevice::CreateControlL().

+
Preparing for printing void CPdrExample::PrintPages()

This function prepares the printer driver for printing the pages. +It involves the following:

    +
  • Gets the number +of bands per page using CPrinterControl::BandsPerPage()

  • +
  • Gets each band +to be printed using CPrinterDevice::QueueGetBand(TRequestStatus& +aStatus, TBandAttributes& aBand)

  • +
  • Creates a graphic +context using CPrinterDevice::CreateContextL() to +draw

  • +
  • Terminates the +print process using CPrinterControl::QueueEndPrint(TRequestStatus +&) when no more bands are available.

  • +
+
Class Summary

CPrinterDevice

CPrinterControl

CPrinterDriver

CGraphicsContext

+
Usage

This is a console application, so +does not have a GUI. It builds an executable called pdrstoreexample.exe in the standard location (\epoc32\release\winscw\ <build_variant> for CodeWarrior). The Symbian platform +build process describes how to build this application. After +launching the executable, depending on the emulator you are using, +you may need to task away from the app launcher/shell screen to view +the console.

\ No newline at end of file