summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2014-09-11 15:05:00 +0000
committerSimon Steiner <ssteiner@apache.org>2014-09-11 15:05:00 +0000
commit187fbd17ecfcf76b019b4057ee905ba995a61d6a (patch)
tree739f56c39c930ca6eea01816f67ad0b31d844363
parent6300064cb5a8b81d91c4a105f74315fd11ada39d (diff)
downloadxmlgraphics-fop-187fbd17ecfcf76b019b4057ee905ba995a61d6a.tar.gz
xmlgraphics-fop-187fbd17ecfcf76b019b4057ee905ba995a61d6a.zip
FOP-2411: PDF to PDF Link not working
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1624312 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java7
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFPainter.java1
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFRenderingContext.java12
3 files changed, 20 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java b/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
index 648cdce7a..fddbdff91 100644
--- a/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
+++ b/src/java/org/apache/fop/render/pdf/PDFDocumentHandler.java
@@ -38,6 +38,7 @@ import org.apache.fop.accessibility.StructureTreeEventHandler;
import org.apache.fop.apps.MimeConstants;
import org.apache.fop.fo.extensions.xmp.XMPMetadata;
import org.apache.fop.pdf.PDFAnnotList;
+import org.apache.fop.pdf.PDFArray;
import org.apache.fop.pdf.PDFDocument;
import org.apache.fop.pdf.PDFPage;
import org.apache.fop.pdf.PDFResources;
@@ -94,6 +95,8 @@ public class PDFDocumentHandler extends AbstractBinaryWritingIFDocumentHandler {
private final PDFDocumentNavigationHandler documentNavigationHandler
= new PDFDocumentNavigationHandler(this);
+ private Map<Integer, PDFArray> pageNumbers = new HashMap<Integer, PDFArray>();
+
/**
* Default constructor.
*/
@@ -352,4 +355,8 @@ public class PDFDocumentHandler extends AbstractBinaryWritingIFDocumentHandler {
}
return structureTreeBuilder;
}
+
+ public Map<Integer, PDFArray> getPageNumbers() {
+ return pageNumbers;
+ }
}
diff --git a/src/java/org/apache/fop/render/pdf/PDFPainter.java b/src/java/org/apache/fop/render/pdf/PDFPainter.java
index f85328b8b..d1f247eea 100644
--- a/src/java/org/apache/fop/render/pdf/PDFPainter.java
+++ b/src/java/org/apache/fop/render/pdf/PDFPainter.java
@@ -188,6 +188,7 @@ public class PDFPainter extends AbstractIFPainter<PDFDocumentHandler> {
PDFRenderingContext pdfContext = new PDFRenderingContext(
getUserAgent(), generator, getDocumentHandler().getCurrentPage(), getFontInfo());
pdfContext.setMarkedContentInfo(imageMCI);
+ pdfContext.setPageNumbers(getDocumentHandler().getPageNumbers());
return pdfContext;
}
diff --git a/src/java/org/apache/fop/render/pdf/PDFRenderingContext.java b/src/java/org/apache/fop/render/pdf/PDFRenderingContext.java
index 80adfa5c8..429d9b936 100644
--- a/src/java/org/apache/fop/render/pdf/PDFRenderingContext.java
+++ b/src/java/org/apache/fop/render/pdf/PDFRenderingContext.java
@@ -19,10 +19,13 @@
package org.apache.fop.render.pdf;
+import java.util.Map;
+
import org.apache.xmlgraphics.util.MimeConstants;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.fonts.FontInfo;
+import org.apache.fop.pdf.PDFArray;
import org.apache.fop.pdf.PDFPage;
import org.apache.fop.render.AbstractRenderingContext;
import org.apache.fop.render.pdf.PDFLogicalStructureHandler.MarkedContentInfo;
@@ -36,6 +39,7 @@ public class PDFRenderingContext extends AbstractRenderingContext {
private FontInfo fontInfo;
private PDFPage page;
private MarkedContentInfo mci;
+ private Map<Integer, PDFArray> pageNumbers;
/**
* Main constructor.
@@ -88,4 +92,12 @@ public class PDFRenderingContext extends AbstractRenderingContext {
MarkedContentInfo getMarkedContentInfo() {
return mci;
}
+
+ public Map<Integer, PDFArray> getPageNumbers() {
+ return pageNumbers;
+ }
+
+ public void setPageNumbers(Map<Integer, PDFArray> pageNumbers) {
+ this.pageNumbers = pageNumbers;
+ }
}