Module org.sejda.sambox
Class PDPageDestination
java.lang.Object
org.sejda.sambox.pdmodel.interactive.documentnavigation.destination.PDDestination
org.sejda.sambox.pdmodel.interactive.documentnavigation.destination.PDPageDestination
- All Implemented Interfaces:
COSObjectable,PDDestinationOrAction
- Direct Known Subclasses:
PDPageFitDestination,PDPageFitHeightDestination,PDPageFitRectangleDestination,PDPageFitWidthDestination,PDPageXYZDestination
This represents a destination to a page, see subclasses for specific parameters.
- Author:
- Ben Litchfield
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConvert this standard java object to a COS object.getPage()This will get the page for this destination.intThis will get the page number for this destination.intReturns the page number for this destination, regardless of whether this is a page number or a reference to a page.voidSet the page for a local destination.voidsetPageNumber(int pageNumber) Set the page number for a remote destination.abstract voidTransforms the destination target coordinates based on the given transformationMethods inherited from class org.sejda.sambox.pdmodel.interactive.documentnavigation.destination.PDDestination
create
-
Field Details
-
array
Storage for the page destination.
-
-
Constructor Details
-
PDPageDestination
protected PDPageDestination() -
PDPageDestination
- Parameters:
array- A page destination array.
-
-
Method Details
-
getPage
This will get the page for this destination. A page destination can either reference a page (for a local destination) or a page number (when doing a remote destination to another PDF). If this object is referencing by page number then this method will return null andgetPageNumber()should be used.- Returns:
- The page for this destination.
-
setPage
Set the page for a local destination. For an external destination, callsetPageNumber(int pageNumber).- Parameters:
page- The page for a local destination.
-
getPageNumber
public int getPageNumber()This will get the page number for this destination. A page destination can either reference a page (for a local destination) or a page number (when doing a remote destination to another PDF). If this object is referencing by page number then this method will return that number, otherwise -1 will be returned.- Returns:
- The zero-based page number for this destination.
-
retrievePageNumber
public int retrievePageNumber()Returns the page number for this destination, regardless of whether this is a page number or a reference to a page.- Returns:
- the 0-based page number, or -1 if the destination type is unknown.
- See Also:
-
setPageNumber
public void setPageNumber(int pageNumber) Set the page number for a remote destination. For an internal destination, callsetPage(PDPage page).- Parameters:
pageNumber- The page for a remote destination.
-
getCOSObject
Convert this standard java object to a COS object.- Returns:
- The cos object that matches this Java object.
-
transform
Transforms the destination target coordinates based on the given transformation- Parameters:
transformation-
-