public class PDFGoTo extends PDFAction
| Constructor and Description |
|---|
PDFGoTo(String pageReference)
create a /GoTo object.
|
PDFGoTo(String destination,
boolean isNamedDestination)
create a /GoTo object.
|
PDFGoTo(String pageReference,
Point2D position)
create a /GoTo object.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
contentEquals(PDFObject obj)
Check if the other PDFObject has the same content as the current object.
|
String |
getAction()
Get the PDF reference for the GoTo action.
|
void |
setDestination(String dest)
Set the destination string for this Goto.
|
void |
setPageReference(PDFReference pageReference)
Sets page reference after object has been created
|
void |
setPosition(Point2D position)
Sets the target (X,Y) position
|
void |
setXPosition(float xPosition)
Sets the x Position to jump to
|
void |
setYPosition(float yPosition)
Sets the Y position to jump to
|
String |
toPDFString()
This method returns a String representation of the PDF object.
|
encodeScriptencode, encodeBinaryToHexString, encodeString, encodeText, formatObject, getChildren, getDocument, getDocumentSafely, getGeneration, getObjectID, getObjectNumber, getParent, hasObjectNumber, makeReference, output, outputInline, referencePDF, setDocument, setObjectNumber, setObjectNumber, setObjectNumber, setParent, toPDFpublic PDFGoTo(String destination, boolean isNamedDestination)
destination - name of the destinationisNamedDestination - set to true if the destination is a named destinationpublic PDFGoTo(String pageReference)
pageReference - the pageReference represented by this objectpublic void setPageReference(PDFReference pageReference)
pageReference - the new page reference to usepublic void setPosition(Point2D position)
position - the target's on-page coordinates in pointspublic void setXPosition(float xPosition)
xPosition - x positionpublic void setYPosition(float yPosition)
yPosition - y positionpublic void setDestination(String dest)
dest - the PDF destination stringpublic String getAction()
public String toPDFString()
toPDFString in class PDFObjectprotected 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 PDFObjectobj - object to compare to.Copyright © 2023 Apache Software Foundation. All rights reserved.