From: Jeremias Maerki Date: Thu, 21 Oct 2010 06:44:32 +0000 (+0000) Subject: Wrap the whole page stream in a q..Q pair to avoid problems when the page streams... X-Git-Tag: fop-1_1rc1old~425 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c7f63f3f3a9d864e4da0940ad1d0dbf7a60f558a;p=xmlgraphics-fop.git 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 --- 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");