Browse Source

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
tags/fop-1_1rc1old
Jeremias Maerki 13 years ago
parent
commit
c7f63f3f3a
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java

+ 2
- 0
src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java View 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");

Loading…
Cancel
Save