diff options
Diffstat (limited to 'src/java/org/apache/fop')
-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()); |