setFullPage() tells TQPrinter whether you want to deal with the full page or just with the part the printer can draw on. The default is FALSE, so that by default you should be able to paint on (0,0). If TRUE the origin of the coordinate system will be in the top left corner of the paper and most probably the printer will not be able to paint something there due to it's physical margins.
Except where noted, you can only call the set functions before setup(), or between TQPainter::end() and setup(). (Some may take effect between setup() and begin(), or between begin() and end(), but that's strictly undocumented and such behaviour may differ depending on platform.)
colorMode() tells the application program whether to print in color or grayscale. (If you print in color and the printer does not support color, TQt will try to approximate. The document may take longer to print, but the quality should not be made visibly poorer.)
Once you start printing, calling newPage() is essential. You will probably also need to look at the TQPaintDeviceMetrics for the printer (see the print function in the Application walk-through). In previous versions, paint device metrics were valid only after the TQPrinter has been set up, i.e. after setup() has returned successfully. This is no longer the case and paint device metrics can be requested safely before set up.
If your current locale converts "," to ".", you will need to set a locale (via the standard C setlocale() function) that doen't do this before using TQPrinter. The "C" locale works well for this.
The TrueType font embedding for Qt's postscript driver uses code by David Chappell of Trinity College Computing Center.
.PP
Copyright 1995, Trinity College Computing Center. Written by David Chappell.
.PP
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty.
.PP
TrueType font support. These functions allow PPR to generate PostScript fonts from Microsoft compatible TrueType font files.
.PP
The functions in this file do most of the work to convert a TrueType font to a type 3 PostScript font.
.PP
Most of the material in this file is derived from a program called" ttf2ps" which L. S. Ng posted to the usenet news group" comp.sources.postscript". The author did not provide a copyright notice or indicate any restrictions on use.
.PP
Last revised 11 July 1995.
.PP
See also Graphics Classes and Image Processing Classes.
\fCTQPrinter::LastPageFirst\fR - the highest-numbered page should be printed first.
.SH "TQPrinter::PageSize"
This enum type specifies what paper size TQPrinter should use. TQPrinter does not check that the paper size is available; it just uses this information, together with TQPrinter::Orientation and TQPrinter::setFullPage(), to determine the printable area (see TQPaintDeviceMetrics).
This enum type specifies what paper source TQPrinter is to use. TQPrinter does not check that the paper source is available; it just uses this information to try and set the paper source. Whether it will set the paper source depends on whether the printer has that particular source.
\fCTQPrinter::ScreenResolution\fR - Sets the resolution of the print device to the screen resolution. This has the big advantage that the results obtained when painting on the printer will match more or less exactly the visible output on the screen. It is the easiest to use, as font metrics on the screen and on the printer are the same. This is the default value. ScreenResolution will produce a lower quality output than HighResolution and should only be used for drafts.
\fCTQPrinter::Compatible\fR - Almost the same as PrinterResolution, but keeps some peculiarities of the TQt 2.x printer driver. This is useful for applications ported from TQt 2.x to TQt 3.x.
This enum describes various printer options that appear in the printer setup dialog. It is used to enable and disable these options in the setup dialog.
Returns the width of the left margin and the height of the top margin of the printer. On Unix, this is a best-effort guess, not based on perfect knowledge.
.PP
If you have called setFullPage( TRUE ), margins().width() may be treated as the smallest sane left margin you can use, and margins().height() as the smallest sane top margin you can use.
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
Sets \fItop\fR, \fIleft\fR, \fIbottom\fR and \fIright\fR to the margins of the printer. On Unix, this is a best-effort guess, not based on perfect knowledge.
.PP
If you have called setFullPage( TRUE ), the four values specify the smallest sane margins you can use.
This value will return the number of times the application is required to print in order to match the number specified in the printer setup dialog. This has been done since some printer drivers are not capable of buffering up the copies and the application in those cases have to make an explicit call to the print code for each copy.
The default is to return a null string; meaning that TQPrinter will try to be smart in a system-dependent way. On X11 only, you can set it to something different to use a specific print program.
Sets the name of the application that created the document to \fIcreator\fR.
.PP
This function is only applicable to the X11 version of Qt. If no creator name is specified, the creator will be set to "Qt" followed by some version number.
Sets TQPrinter to have the origin of the coordinate system at the top-left corner of the paper if \fIfp\fR is TRUE, or where it thinks the top-left corner of the printable area is if \fIfp\fR is FALSE.
The default is FALSE. You can (probably) print on (0,0), and TQPaintDeviceMetrics will report something smaller than the size indicated by PageSize. (Note that TQPrinter may be wrong on Unix systems - it does not have perfect knowledge of the physical printer.)
If you set \fIfp\fR to TRUE, TQPaintDeviceMetrics will report the exact same size as indicated by PageSize, but you cannot print on all of that - you must take care of the output margins yourself.
Sets the min-page and max-page settings to \fIminPage\fR and \fImaxPage\fR respectively.
.PP
The min-page and max-page restrict the from-page and to-page settings. When the printer setup dialog appears, the user cannot select a from page or a to page that are outside the range specified by min and max pages.
.PP
See also minPage(), maxPage(), setFromTo(), and setup().
The printer driver reads this setting and prints using the specified orientation. On Windows this setting won't take effect until the printer dialog is shown (using TQPrinter::setup()).
Sets the name of the output file to \fIfileName\fR.
.PP
Setting a null or empty name (0 or "") disables output to a file, i.e. calls setOutputToFile(FALSE). Setting a non-empty name enables output to a file, i.e. calls setOutputToFile(TRUE).
.PP
This function is currently only supported under X11.
The page order can be TQPrinter::FirstPageFirst or TQPrinter::LastPageFirst. The application programmer is responsible for reading the page order and printing accordingly.
Sets the default selected page range to be used when the print setup dialog is opened to \fIrange\fR. If the PageRange specified by \fIrange\fR is currently disabled the function does nothing.
The default printer will be used if no printer name is set.
.PP
Under X11, the \fCPRINTER\fR environment variable defines the default printer. Under any other window system, the window system defines the default printer.
Sets the printer to use \fIoption\fR to select the printer. \fIoption\fR is null by default (which implies that TQt should be smart enough to guess correctly), but it can be set to other values to use a specific printer selection option.
Windows only, using this function is not portable! Sets the windows page size value that is used by the \fCDEVMODE\fR struct. The \fIwinPageSize\fR value must be one of the DMPAPER_ defines from wingdi.h.