aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/pdf/PDFLink.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/pdf/PDFLink.java')
-rw-r--r--src/java/org/apache/fop/pdf/PDFLink.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/java/org/apache/fop/pdf/PDFLink.java b/src/java/org/apache/fop/pdf/PDFLink.java
index 23e36e41d..78da2d867 100644
--- a/src/java/org/apache/fop/pdf/PDFLink.java
+++ b/src/java/org/apache/fop/pdf/PDFLink.java
@@ -77,12 +77,11 @@ public class PDFLink extends PDFObject {
/**
* create objects associated with a link annotation (GoToR)
*
- * @param number the object's number
* @param r the rectangle of the link hotspot in absolute coordinates
*/
- public PDFLink(int number, Rectangle2D r) {
+ public PDFLink(Rectangle2D r) {
/* generic creation of PDF object */
- super(number);
+ super();
this.ulx = (float)r.getX();
this.uly = (float)r.getY();
@@ -101,18 +100,16 @@ public class PDFLink extends PDFObject {
}
/**
- * produce the PDF representation of the object
- *
- * @return the PDF
+ * @see org.apache.fop.pdf.PDFObject#toPDFString()
*/
- public byte[] toPDF() {
- String p = this.number + " " + this.generation + " obj\n"
+ public String toPDFString() {
+ String s = getObjectID()
+ "<< /Type /Annot\n" + "/Subtype /Link\n" + "/Rect [ "
+ (ulx) + " " + (uly) + " "
+ (brx) + " " + (bry) + " ]\n" + "/C [ "
+ this.color + " ]\n" + "/Border [ 0 0 0 ]\n" + "/A "
+ this.action.getAction() + "\n" + "/H /I\n>>\nendobj\n";
- return p.getBytes();
+ return s;
}
/*