From c7f63f3f3a9d864e4da0940ad1d0dbf7a60f558a Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Thu, 21 Oct 2010 06:44:32 +0000 Subject: [PATCH] Wrap the whole page stream in a q..Q pair to avoid problems when the page streams are combined later with additional content. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1025850 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java b/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java index cf3053e19..409b8dd9f 100644 --- a/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java +++ b/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java @@ -256,6 +256,7 @@ public class PDFDocumentGraphics2D extends PDFGraphics2D { if (!pdfContext.isPagePending()) { return; //ignore } + currentStream.write("Q\n"); //Finish page PDFStream pdfStream = this.pdfDoc.getFactory().makeStream( PDFFilterList.CONTENT_FILTER, false); @@ -321,6 +322,7 @@ public class PDFDocumentGraphics2D extends PDFGraphics2D { pdfContext.setCurrentPage(page); pageRef = page.referencePDF(); + currentStream.write("q\n"); AffineTransform at = new AffineTransform(1.0, 0.0, 0.0, -1.0, 0.0, height); currentStream.write("1 0 0 -1 0 " + height + " cm\n"); -- 2.39.5