Printing
Setting up for printing is a bit tortous. Here's how the various classes
are supposed to be used:
- Create an nsDeviceContextSpecFactoryOS2
- Call the CreateDeviceContextSpec method in the factory.
This pops up the select-queue dialog; job properties can be done.
Eventually we end up with an nsDeviceContextSpecOS2. This is basically
a PRQINFO3 structure.
- Call the GetDeviceContextFor method in the (screen) DC which
you want the print DC to be compatible with.
This creates a new DC, which has an HDC and
HPS for the chosen printer.
- Use the various printing-specific methods in the new DC to control
document and page breaks.
- Create RCs from the print DC and output to the printer.
Most of the work talking to the spooler and so on is done by code in
libprint.c, which is more-or-less independent from the rest of the code.
Look in to margin problems
Allow for non-square pixels