aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/render
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-08-14 14:50:30 +0000
committerKeiron Liddle <keiron@apache.org>2001-08-14 14:50:30 +0000
commitb269a5cca4b6b588dae41d54a29a231c37e9624f (patch)
tree1cd6a836ba91e470343f439f969f9e76848b6650 /src/org/apache/fop/render
parent954d6b9829320351b127766b3ecb7592b387521c (diff)
downloadxmlgraphics-fop-b269a5cca4b6b588dae41d54a29a231c37e9624f.tar.gz
xmlgraphics-fop-b269a5cca4b6b588dae41d54a29a231c37e9624f.zip
adds support for svg links to be put into the pdf
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194423 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/render')
-rw-r--r--src/org/apache/fop/render/pdf/PDFRenderer.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/org/apache/fop/render/pdf/PDFRenderer.java b/src/org/apache/fop/render/pdf/PDFRenderer.java
index 01dacee24..3fa74f812 100644
--- a/src/org/apache/fop/render/pdf/PDFRenderer.java
+++ b/src/org/apache/fop/render/pdf/PDFRenderer.java
@@ -417,7 +417,7 @@ public class PDFRenderer extends PrintRenderer {
currentYPosition);
graphics.setGraphicContext(new org.apache.batik.ext.awt.g2d.GraphicContext());
graphics.setRenderingHints(rc.getRenderingHints());
- aBridge.setPDFGraphics2D(graphics);
+ aBridge.setCurrentTransform(new AffineTransform(sx, 0, 0, sy, xOffset / 1000f, yOffset / 1000f));
try {
root = builder.build(ctx, doc);
root.paint(graphics, rc);
@@ -427,6 +427,8 @@ public class PDFRenderer extends PrintRenderer {
+ e.getMessage());
}
+ currentAnnotList = graphics.getAnnotList();
+
currentStream.add("Q\n");
}
@@ -740,8 +742,10 @@ public class PDFRenderer extends PrintRenderer {
page.getWidth() / 1000,
page.getHeight() / 1000, page);
- if (page.hasLinks()) {
- currentAnnotList = this.pdfDoc.makeAnnotList();
+ if (page.hasLinks() || currentAnnotList != null) {
+ if(currentAnnotList == null) {
+ currentAnnotList = this.pdfDoc.makeAnnotList();
+ }
currentPage.setAnnotList(currentAnnotList);
Enumeration e = page.getLinkSets().elements();
@@ -758,6 +762,7 @@ public class PDFRenderer extends PrintRenderer {
dest, linkType));
}
}
+ currentAnnotList = null;
} else {
// just to be on the safe side
currentAnnotList = null;