Expression qt.QtLuaPrinter(mode) returns a new instance of class qt.QtLuaPrinter.
The optional argument mode is a string specifying
the resolution of the initial coordinate system.
The default value ScreenResolution replicates the screen resolution.
Value HighResolution initializes the coordinate
system with the resolution of the printer.
There are in fact two ways to setup the coordinate system:
qt.QtLuaPrinter with the desired mode,
set the paper type using printer.pageSize,
create a qt.QtLuaPainter and obtain
obtain the size of the drawable area using
painter.width
and painter.heigth.
qt.QtLuaPrinter,
set the paper type using printer.pageSize,
and specify the desired size of the drawable area
using printer.papersize.
This will ensure that the desired drawable area
fits nicely in the paper size. When using Qt-4.4 or greater
and printing to a PostScript or PDF file, this will
also ensure that the image described in the resulting
file has the desired dimensions.
Most printer properties should be set before
creating the qt.QtLuaPainter
that will peform the drawings.