public class PDFLink extends PDFObject
Modifier and Type | Field and Description |
---|---|
static int |
EXTERNAL
Used to represent an external link.
|
static int |
INTERNAL
Used to represent an internal link.
|
Constructor and Description |
---|
PDFLink(Rectangle2D r)
create objects associated with a link annotation (GoToR)
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
contentEquals(PDFObject obj)
Check if the other PDFObject has the same content as the current object.
|
void |
getChildren(Set<PDFObject> children) |
void |
setAction(PDFAction action)
Set the pdf action for this link.
|
void |
setStructParent(int structParent)
Sets the value of the StructParent entry for this link.
|
String |
toPDFString()
This method returns a String representation of the PDF object.
|
encode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, supportsObjectStream, toPDF
public static final int EXTERNAL
public static final int INTERNAL
public PDFLink(Rectangle2D r)
r
- the rectangle of the link hotspot in absolute coordinatespublic void setAction(PDFAction action)
action
- the pdf action that is activated for this linkpublic void setStructParent(int structParent)
structParent
- key in the structure parent treepublic String toPDFString()
toPDFString
in class PDFObject
protected boolean contentEquals(PDFObject obj)
Note: This function has a contract which is less binding than
Object.equals(Object)
. Whereas equals would require all values to be
identical, this method is not required to check everything. In the case
of PDFObjects, this means that the overriding function does not have to
check for PDFObject.getObjectID()
.
contentEquals
in class PDFObject
obj
- object to compare to.public void getChildren(Set<PDFObject> children)
getChildren
in class PDFObject
Copyright © 2025 Apache Software Foundation. All rights reserved.