]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Wrap the whole page stream in a q..Q pair to avoid problems when the page streams...
authorJeremias Maerki <jeremias@apache.org>
Thu, 21 Oct 2010 06:44:32 +0000 (06:44 +0000)
committerJeremias Maerki <jeremias@apache.org>
Thu, 21 Oct 2010 06:44:32 +0000 (06:44 +0000)
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

index cf3053e19c44c521560f962fe6fd5f360fa0ce7c..409b8dd9ffea250cd684b944272ae1c9443935ad 100644 (file)
@@ -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");