xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbry...@apache.org
Subject svn commit: r524607 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java
Date Sun, 01 Apr 2007 14:50:59 GMT
Author: jbryant
Date: Sun Apr  1 07:50:58 2007
New Revision: 524607

URL: http://svn.apache.org/viewvc?view=rev&rev=524607
Log:
changes to support named destinations

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java?view=diff&rev=524607&r1=524606&r2=524607
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java Sun Apr  1 07:50:58
2007
@@ -73,6 +73,7 @@
 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.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 @@
      * @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();



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message