org.pdfbox.pdmodel.interactive.documentnavigation.destination
Class PDPageDestination
- COSObjectable, PDDestinationOrAction
public abstract class PDPageDestination
This represents a destination to a page, see subclasses for specific parameters.
array
protected COSArray array
Storage for the page destination.
PDPageDestination
protected PDPageDestination()
Constructor to create empty page destination.
PDPageDestination
protected PDPageDestination(COSArray arr)
Constructor to create empty page destination.
arr
- A page destination array.
getCOSArray
public COSArray getCOSArray()
Convert this standard java object to a COS object.
- The cos object that matches this Java object.
getCOSObject
public COSBase getCOSObject()
Convert this standard java object to a COS object.
- getCOSObject in interface COSObjectable
- The cos object that matches this Java object.
getPage
public PDPage getPage()
This will get the page for this destination. A page destination
can either reference a page 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 and getPageNumber should be used.
- The page for this destination.
getPageNumber
public int getPageNumber()
This will get the page number for this destination. A page destination
can either reference a page 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.
- The page number for this destination.
setPage
public void setPage(PDPage page)
Set the page for this destination.
page
- The page for the destination.
setPageNumber
public void setPageNumber(int pageNumber)
Set the page number for this destination.
pageNumber
- The page for the destination.