aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/svg/PDFDocumentGraphics2D.java
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-11-12 13:10:12 +0000
committerKeiron Liddle <keiron@apache.org>2001-11-12 13:10:12 +0000
commit364a97a6e14a63a4df36b64d492a26ea59cfa173 (patch)
tree942ed7e3c5f0d0b43a0c6856ea6b548ce130a7fc /src/org/apache/fop/svg/PDFDocumentGraphics2D.java
parent290c33e88a2fbc430d52e3754813e6519193982c (diff)
downloadxmlgraphics-fop-364a97a6e14a63a4df36b64d492a26ea59cfa173.tar.gz
xmlgraphics-fop-364a97a6e14a63a4df36b64d492a26ea59cfa173.zip
some changes for out of order rendering and rendering to a renderer
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194565 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/svg/PDFDocumentGraphics2D.java')
-rw-r--r--src/org/apache/fop/svg/PDFDocumentGraphics2D.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/org/apache/fop/svg/PDFDocumentGraphics2D.java b/src/org/apache/fop/svg/PDFDocumentGraphics2D.java
index 5c65c8eb0..a97763353 100644
--- a/src/org/apache/fop/svg/PDFDocumentGraphics2D.java
+++ b/src/org/apache/fop/svg/PDFDocumentGraphics2D.java
@@ -37,6 +37,7 @@ import org.apache.batik.ext.awt.g2d.GraphicContext;
public class PDFDocumentGraphics2D extends PDFGraphics2D {
OutputStream stream;
+ PDFPage currentPage;
PDFStream pdfStream;
int width;
int height;
@@ -77,6 +78,10 @@ public class PDFDocumentGraphics2D extends PDFGraphics2D {
currentFontSize = 0;
currentYPosition = 0;
currentXPosition = 0;
+
+ PDFResources pdfResources = this.pdfDoc.getResources();
+ currentPage = this.pdfDoc.makePage(pdfResources,
+ width, height);
}
void setupDocument(OutputStream stream, int width, int height) {
@@ -149,8 +154,8 @@ public class PDFDocumentGraphics2D extends PDFGraphics2D {
public void finish() throws IOException {
pdfStream.add(getString());
PDFResources pdfResources = this.pdfDoc.getResources();
- PDFPage currentPage = this.pdfDoc.makePage(pdfResources, pdfStream,
- width, height);
+ currentPage.setContents(pdfStream);
+ this.pdfDoc.addPage(currentPage);
if(currentAnnotList != null) {
currentPage.setAnnotList(currentAnnotList);
}