Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.5.0, 4.6.2
-
None
-
WinXP SP2, msvc2005, HP DesignJet 4500, HP DesignJet 500
Description
1. Call to QPageSetupDialog::exec for some large-format printer
2. Select paper size A1, A0 (and many other large formats)
3. Ask for paper size by QPrinter::paperSize(QPrinter::Millimeter) reports invalid sizes (<0).
================================================
Deep code walking shows that paper size is QPrinter::Custom, and field for size is QSizeF(-1, -1).
More deepest code walking shows, that in qpagesetupdialog_win.cpp, in the QPageSetupDialog::exec(), are made next things:
1) Call to PageSetupDlg( PAGESETUPDLG *) - ok
2) PageSetupDialog returns in PAGESETUPDLG structure page size, but it is ignored (why?..)
3) Call to QWin32PrintEnginePrivate::updateCustomPaperSize can't detect paper size, because:
3.1) It enumerates "print forms" FORM_INFO_1* by EnumForms
3.2) And trying take "form" with number dmPaperSize from DEVMODEW struct
3.3) But dmPaperSize is more than available number of forms,
3.4) So it failed....
May be, it is because printer driver does not register custom forms for all system, I don't know.
But I think, it is possible to take paper size from PAGESETUPDLG, if QWin32PrintEnginePrivate::updateCustomPaperSize can't do this. My simple patching of updateCustomPaperSize solves problem with paper size.
And please look to issue http://bugreports.qt.nokia.com/browse/QTBUG-4940 - may be it is common problem.
Attachments
Issue Links
- is required for
-
QTBUG-25380 QtPrintSupport - Page Layout Issues
- Open
-
QTBUG-25384 QtPrintSupport - Windows issues
- Open