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

PpLoadPrinter()

Initialize a print context with information for a given printer

Synopsis:

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

Library:

ph

Description:

This function initializes the provided print context with information for the printer section named name. If name isn't provided, this function loads the attributes of the default printer as specified in $HOME/.ph/print/config.

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(), PpPrintNewPage(), PpPrintWidget(), PpReleasePC(), PpSetPC(), PpStartJob(), PpSuspendJob(), PtPrintSelection()

Printing chapter of the Programmer's Guide


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