aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render
diff options
context:
space:
mode:
authorJay Bryant <jbryant@apache.org>2007-04-01 14:50:58 +0000
committerJay Bryant <jbryant@apache.org>2007-04-01 14:50:58 +0000
commit03bddb51cc6efd22965858351f429632dea24c52 (patch)
treea1cfa49bc1a3fea928922fcb52304bee72b70b4a /src/java/org/apache/fop/render
parentfdb46ddc0d5825898e684527a43c0732b7b2339d (diff)
downloadxmlgraphics-fop-03bddb51cc6efd22965858351f429632dea24c52.tar.gz
xmlgraphics-fop-03bddb51cc6efd22965858351f429632dea24c52.zip
changes to support named destinations
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@524607 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render')
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFRenderer.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFRenderer.java b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
index 481ce844c..e54df5c87 100644
--- a/src/java/org/apache/fop/render/pdf/PDFRenderer.java
+++ b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
@@ -73,6 +73,7 @@ import org.apache.fop.pdf.PDFAMode;
import org.apache.fop.pdf.PDFAnnotList;
import org.apache.fop.pdf.PDFColor;
import org.apache.fop.pdf.PDFConformanceException;
+import org.apache.fop.pdf.PDFDestination;
import org.apache.fop.pdf.PDFDocument;
import org.apache.fop.pdf.PDFEncryptionManager;
import org.apache.fop.pdf.PDFEncryptionParams;
@@ -105,6 +106,8 @@ import org.apache.xmlgraphics.xmp.Metadata;
import org.apache.xmlgraphics.xmp.schemas.XMPBasicAdapter;
import org.apache.xmlgraphics.xmp.schemas.XMPBasicSchema;
+import org.apache.fop.area.DestinationData;
+
/**
* Renderer that renders areas to PDF.
*/
@@ -509,8 +512,15 @@ public class PDFRenderer extends AbstractPathOrientedRenderer {
* @see org.apache.fop.render.Renderer#processOffDocumentItem(OffDocumentItem)
*/
public void processOffDocumentItem(OffDocumentItem odi) {
+ // render Destinations
+ if (odi instanceof DestinationData) {
+ PDFDestination destination = pdfDoc.getFactory().makeDestination((DestinationData) odi);
+ PageViewport pv = destination.getPageViewport();
+ String dest = (String)pageReferences.get(pv.getKey());
+ destination.setGoToReference(dest);
+ }
// render Bookmark-Tree
- if (odi instanceof BookmarkData) {
+ else if (odi instanceof BookmarkData) {
renderBookmarkTree((BookmarkData) odi);
} else if (odi instanceof OffDocumentExtensionAttachment) {
ExtensionAttachment attachment = ((OffDocumentExtensionAttachment)odi).getAttachment();