aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2010-10-21 06:44:32 +0000
committerJeremias Maerki <jeremias@apache.org>2010-10-21 06:44:32 +0000
commitc7f63f3f3a9d864e4da0940ad1d0dbf7a60f558a (patch)
tree147b5ac11a57c45d8b86365ad0a54323a567b5e6 /src
parent96d303859b3bd045af84e7c44554eee3a9c0f8d0 (diff)
downloadxmlgraphics-fop-c7f63f3f3a9d864e4da0940ad1d0dbf7a60f558a.tar.gz
xmlgraphics-fop-c7f63f3f3a9d864e4da0940ad1d0dbf7a60f558a.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java2
1 files changed, 2 insertions, 0 deletions
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");