Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-8619

Printing: Problem with large paper sizes (A0, A1...)



    • Bug
    • Resolution: Out of scope
    • P3: Somewhat important
    • 4.8.x
    • 4.5.0, 4.6.2
    • GUI: Printing
    • None
    • WinXP SP2, msvc2005, HP DesignJet 4500, HP DesignJet 500


      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.


        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.



              johnlayt John Layt
              romuld Roman Desyatov
              3 Vote for this issue
              6 Start watching this issue



                Gerrit Reviews

                  There are no open Gerrit changes