diff options
author | jtauber <jtauber@unknown> | 1999-12-02 09:37:50 +0000 |
---|---|---|
committer | jtauber <jtauber@unknown> | 1999-12-02 09:37:50 +0000 |
commit | b85a365bfee0a45ad0f5914ad7211addcfca747b (patch) | |
tree | 76e0fc09876b165df3c9a25e4c7e6a1afc52347b /src/org/apache/fop/render | |
parent | b13d4136a30fdc4b4b63d32bda2cdec62a763e29 (diff) | |
download | xmlgraphics-fop-b85a365bfee0a45ad0f5914ad7211addcfca747b.tar.gz xmlgraphics-fop-b85a365bfee0a45ad0f5914ad7211addcfca747b.zip |
added more of Arved Sandtrom's simple-link implementation. New class LinkSet and modifications to Page and PDFRenderer to contain and make use of this class respectively
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193258 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/render')
-rw-r--r-- | src/org/apache/fop/render/pdf/PDFRenderer.java | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/org/apache/fop/render/pdf/PDFRenderer.java b/src/org/apache/fop/render/pdf/PDFRenderer.java index 03bf6d40e..f8265f1b1 100644 --- a/src/org/apache/fop/render/pdf/PDFRenderer.java +++ b/src/org/apache/fop/render/pdf/PDFRenderer.java @@ -64,6 +64,8 @@ import org.apache.fop.pdf.*; import java.io.IOException; import java.io.PrintWriter; import java.util.Enumeration; +import java.awt.Rectangle; +import java.util.Vector; /** * Renderer that renders areas to PDF @@ -457,7 +459,21 @@ public class PDFRenderer implements Renderer { currentStream.add("ET\n"); this.pdfDoc.makePage(this.pdfResources, currentStream, - page.getWidth()/1000, page.getHeight()/1000); + page.getWidth()/1000, + page.getHeight()/1000); + + if (page.hasLinks()) { + Enumeration e = page.getLinkSets().elements(); + while (e.hasMoreElements()) { + LinkSet linkSet = (LinkSet) e.nextElement(); + String dest = linkSet.getDest(); + Enumeration f = linkSet.getRects().elements(); + while (f.hasMoreElements()) { + Rectangle rect = (Rectangle) f.nextElement(); + this.pdfDoc.makeLink(rect, dest); + } + } + } } /** |