Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
4.8.6, 5.1.1
-
None
-
Linux
Description
I'm working on a database modeling tool and when printing huge models the user have the option to configure a custom paper size. The problem comes here: If the he setup a paper size (width x height) like 6000 x 4500 (in pixels) when printing to a PDF file the pages have the dimension inverted: 4500 x 6000.
So in the code I have to explicitly invert the values like this:
printer->setPaperSize(QSizeF(page_size.height(), page_size.width()), QPrinter::DevicePixel);
I've reviewed the entire printing code and the problem only occurs with custom page sizes.
The attached images shows the problem. The first (pdf_ok) is the result after invert the page size coordinates and the second image is the original result (without invert). Note, in the second one, the blank space at bottom.