PpLoadDefaultPrinter()

Initialize a print context with information for the default printer

Synopsis:

int PpLoadDefaultPrinter( PpPrintContext_t *pc );

Arguments:

pc
The pointer to a PpPrintContext_t structure that was returned by PpCreatePC().

Library:

ph

Description:

This function initializes the provided print context with the information found in $HOME/.ph/printers/default for the default printer.

Returns:

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

Examples:

PpPrintContext_t *pc = PpCreatePC();
PpLoadDefaultPrinter( pc );
PpStartJob( pc );

PpContinueJob( pc );

// Draw stuff

PpSuspendJob( pc );
PpEndJob( pc );
PpReleasePC( pc );

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PpContinueJob(), PpCreatePC(), PpEndJob(), PpFreePrinterList(), PpGetPC(), PpLoadPrinter(), PpLoadPrinterList(), PpPrintContext_t, PpPrintNewPage(), PpPrintWidget(), PpReleasePC(), PpSetPC(), PpStartJob(), PpSuspendJob(), PtPrintSelection()

Printing chapter of the Programmer's Guide