Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
4.5.2, 4.6.0, 5.4.1, 5.12.0
Description
Previously logged and acknowledged as issue number #261362 in old system but never visible there or here.
I use QPrinter::setFullPage() to allow me to place a full-page sized template of a complex form (from an SVG file) on the page. On Linux it works fine. On Windows the template image is offset because, apparently, full page does not mean that on Windows (except when the print is directed to PDF).
This test code:
#include <QtGui> int main(int argc, char *argv[]) { QApplication app(argc, argv); QPrinter p(QPrinter::HighResolution); p.setPaperSize(QPrinter::A4); p.setOrientation(QPrinter::Landscape); p.setFullPage(true); qDebug() << "Page rect: " << p.pageRect(); qDebug() << "Paper rect: " << p.paperRect(); QWidget mainWin; mainWin.show(); return app.exec(); }
On Linux prints equal page and paper rectangles as the docs imply:
Page rect: QRect(0,0 14033x9917)
Paper rect: QRect(0,0 14033x9917)
and Windows with a 'real' printer selected:
Page rect: QRect(99,99 6814x4760)
Paper rect: QRect(0,0 7016x4961)
The result is the template is properly placed over the entire page in Linux but is offset right and down on Windows. If the default Windows printer is set to a virtual printer (e.g. Distiller or XPS Writer) the behaviour is correct.
Qt 4.5.2 on Linux. Qt 4.5.2 in Qt SDK 2009.03 on Windows
Attachments
Issue Links
- is required for
-
QTBUG-25380 QtPrintSupport - Page Layout Issues
- Open
-
QTBUG-25384 QtPrintSupport - Windows issues
- Open