PpLoadPrinter()

Initialize a print context with information for a given printer

Synopsis:

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

Arguments:

pc
The pointer to a PpPrintContext_t structure that was returned by PpCreatePC().
name
The name of the printer whose attributes you want to use to initialize the print context. If name is NULL, this function loads the attributes of the default printer as specified in $HOME/.ph/printers/default.

Library:

ph

Description:

This function initializes the provided print context with information for the printer section named name.

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 = PpCreatePC();
PpLoadPrinter( pc, "GenericPostScriptPrinter@localhost");
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(), PpGetPC(), PpLoadDefaultPrinter(), PpPrintContext_t, PpPrintNewPage(), PpPrintWidget(), PpReleasePC(), PpSetPC(), PpStartJob(), PpSuspendJob(), PtPrintSelection()

Printing chapter of the Programmer's Guide