[Previous] [Contents] [Index] [Next]

PpLoadPrinter()

Initialize a print context with information for a given printer

Synopsis:

int PpLoadPrinter( PpPrintContext_t *pc, 
                   char const *name );

Description:

This function initializes the provided print context with the printer file information for the printer section named name. If name isn't provided, this function loads the attributes of the default printer as specified in the printer files. The files used by this function are:

The value of PHOTON_PATH depends on your installation:

/usr/photon
Before Photon 1.13.
/qnx4/photon
Photon 1.13 or later.

Returns:

0
Success.
-1
No name was specified and no default printer could be found, or the printer definition loaded didn't define a destination device or filename, so no output can be generated.

Examples:

PpPrintContext_t *pc = PpPrintCreatePC();
PpLoadPrinter( pc, "PostScript Printer");
PpPrintOpen( pc );

PpPrintStart( pc );

// Draw stuff

PpPrintStop( pc );
PpPrintClose( pc );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

[Previous] [Contents] [Index] [Next]