From d6d112667d521a5cae90b82b1086d6cd2753b889 Mon Sep 17 00:00:00 2001 From: Jakub Melka Date: Sat, 24 Aug 2019 14:55:26 +0200 Subject: [PATCH] Bugfix: Clear operand stack, when we are drawing forms --- PdfForQtLib/sources/pdfpagecontentprocessor.cpp | 3 +++ PdfForQtLib/sources/pdfrenderer.cpp | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/PdfForQtLib/sources/pdfpagecontentprocessor.cpp b/PdfForQtLib/sources/pdfpagecontentprocessor.cpp index 42e4200..aeec36d 100644 --- a/PdfForQtLib/sources/pdfpagecontentprocessor.cpp +++ b/PdfForQtLib/sources/pdfpagecontentprocessor.cpp @@ -2066,6 +2066,9 @@ void PDFPageContentProcessor::paintXObjectImage(const PDFStream* stream) void PDFPageContentProcessor::operatorPaintXObject(PDFPageContentProcessor::PDFOperandName name) { + // We want to have empty operands, when we are invoking forms + m_operands.clear(); + if (m_xobjectDictionary) { // According to the specification, XObjects are skipped entirely, as no operator was invoked. diff --git a/PdfForQtLib/sources/pdfrenderer.cpp b/PdfForQtLib/sources/pdfrenderer.cpp index dcfc2ca..6eee789 100644 --- a/PdfForQtLib/sources/pdfrenderer.cpp +++ b/PdfForQtLib/sources/pdfrenderer.cpp @@ -31,7 +31,6 @@ PDFRenderer::PDFRenderer(const PDFDocument* document, const PDFFontCache* fontCa Q_ASSERT(document); } -// TODO: Dodelat rotovani stranek // TODO: Clipovani na stranku QList PDFRenderer::render(QPainter* painter, const QRectF& rectangle, size_t pageIndex) const