diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-08-12 15:41:03 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-08-12 15:41:03 +0000 |
commit | 4d61cb6adfe4609b8e9efc3a041059a0826355a6 (patch) | |
tree | 89691afd703fb4d3c0072019abb062d52f80fbee /src/java/org/apache | |
parent | caa63bfe8a10c2d3629a384ec6627eebfc1e302f (diff) | |
download | xmlgraphics-fop-4d61cb6adfe4609b8e9efc3a041059a0826355a6.tar.gz xmlgraphics-fop-4d61cb6adfe4609b8e9efc3a041059a0826355a6.zip |
Implemented named destinations for PDF painter.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@685192 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r-- | src/java/org/apache/fop/render/pdf/PDFPainter.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFPainter.java b/src/java/org/apache/fop/render/pdf/PDFPainter.java index 1456cb9fd..b13bed1e2 100644 --- a/src/java/org/apache/fop/render/pdf/PDFPainter.java +++ b/src/java/org/apache/fop/render/pdf/PDFPainter.java @@ -63,6 +63,7 @@ import org.apache.fop.render.intermediate.extensions.AbstractAction; import org.apache.fop.render.intermediate.extensions.Bookmark; import org.apache.fop.render.intermediate.extensions.BookmarkTree; import org.apache.fop.render.intermediate.extensions.GoToXYAction; +import org.apache.fop.render.intermediate.extensions.NamedDestination; import org.apache.fop.util.CharUtilities; /** @@ -508,6 +509,12 @@ public class PDFPainter extends AbstractBinaryWritingIFPainter { } } + private void renderNamedDestination(NamedDestination destination) { + PDFAction action = getAction(destination.getAction()); + pdfDoc.getFactory().makeDestination( + destination.getName(), action.makeReference()); + } + private PDFAction getAction(AbstractAction action) { if (action instanceof GoToXYAction) { GoToXYAction a = (GoToXYAction)action; @@ -534,6 +541,8 @@ public class PDFPainter extends AbstractBinaryWritingIFPainter { pdfUtil.renderXMPMetadata(wrapper); } else if (extension instanceof BookmarkTree) { renderBookmarkTree((BookmarkTree)extension); + } else if (extension instanceof NamedDestination) { + renderNamedDestination((NamedDestination)extension); } else { log.warn("Don't know how to handle extension object: " + extension + " (" + extension.getClass().getName()); |