From 66c6e233468841d727ec4a60566d24d441ee1d5a Mon Sep 17 00:00:00 2001 From: Jakub Melka Date: Sun, 16 Apr 2023 18:55:10 +0200 Subject: [PATCH] Issue #48: Page not displayed correctly --- Pdf4QtLib/sources/pdfrenderer.cpp | 6 ++++-- RELEASES.txt | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Pdf4QtLib/sources/pdfrenderer.cpp b/Pdf4QtLib/sources/pdfrenderer.cpp index 52e3989..3ea3d3a 100644 --- a/Pdf4QtLib/sources/pdfrenderer.cpp +++ b/Pdf4QtLib/sources/pdfrenderer.cpp @@ -61,8 +61,8 @@ QTransform PDFRenderer::createPagePointToDevicePointMatrix(const PDFPage* page, } QTransform PDFRenderer::createMediaBoxToDevicePointMatrix(const QRectF& mediaBox, - const QRectF& rectangle, - PageRotation rotation) + const QRectF& rectangle, + PageRotation rotation) { QTransform matrix; switch (rotation) @@ -105,6 +105,8 @@ QTransform PDFRenderer::createMediaBoxToDevicePointMatrix(const QRectF& mediaBox } } + matrix.translate(-mediaBox.left(), -mediaBox.top()); + return matrix; } diff --git a/RELEASES.txt b/RELEASES.txt index 9613f9c..f048955 100644 --- a/RELEASES.txt +++ b/RELEASES.txt @@ -1,4 +1,5 @@ CURRENT: + - Issue #48: Page not displayed correctly - Issue #45: Blank page in DocPage Organizer - Issue #43: Save question - Issue #40: Sanitization of documents