10.13 Printing from XPCE applications

You're wonderful application is finished ... but the users want printing???. What to do? A computer screen is not a set of paper-sheets and therefore there is no trivial answer to this question. It depends on the nature of the data that needs to be printed, and also on the operating system used.

In Unix , printing is achieved by producing a document in a format that can be understood by the print-spooler program, normally either plain text or PostScript. If formatted text and/or included graphics are required it is often desirable to produce input for a formatting program, call the formatter and send the result to the printer.

In Windows the printer is not driven by a document, but using a series of calls on a GDI (Graphical Device Interface) representing the printer. The good news of this is that whatever you can get on the screen you easily get on the printer. The bad news has been explained above: paper is not the same as your screen. It has pages, is generally worse in colour-handling but provides a much higher resolution. The users do not expect a series of screendumps from your applications. Most Windows applications however are WYSIWYG and there are no established standards for formatting applications.

10.13.1 Options for document generation

Below is a brief overview of the options available.