Class PDPageFitWidthDestination
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDDestination
-
- org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDPageDestination
-
- org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDPageFitWidthDestination
-
- All Implemented Interfaces:
COSObjectable
,PDDestinationOrAction
public class PDPageFitWidthDestination extends PDPageDestination
This represents a destination to a page at a y location and the width is magnified to just fit on the screen.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
TYPE
The type of this destination.protected static java.lang.String
TYPE_BOUNDED
The type of this destination.-
Fields inherited from class org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDPageDestination
array
-
-
Constructor Summary
Constructors Constructor Description PDPageFitWidthDestination()
Default constructor.PDPageFitWidthDestination(COSArray arr)
Constructor from an existing destination array.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
fitBoundingBox()
A flag indicating if this page destination should just fit bounding box of the PDF.int
getTop()
Get the top y coordinate.void
setFitBoundingBox(boolean fitBoundingBox)
Set if this page destination should just fit the bounding box.void
setTop(int y)
Set the top y-coordinate, a value of -1 implies that the current y-coordinate will be used.-
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDPageDestination
findPageNumber, getCOSObject, getPage, getPageNumber, retrievePageNumber, setPage, setPageNumber
-
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDDestination
create
-
-
-
-
Field Detail
-
TYPE
protected static final java.lang.String TYPE
The type of this destination.- See Also:
- Constant Field Values
-
TYPE_BOUNDED
protected static final java.lang.String TYPE_BOUNDED
The type of this destination.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PDPageFitWidthDestination
public PDPageFitWidthDestination()
Default constructor.
-
PDPageFitWidthDestination
public PDPageFitWidthDestination(COSArray arr)
Constructor from an existing destination array.- Parameters:
arr
- The destination array.
-
-
Method Detail
-
getTop
public int getTop()
Get the top y coordinate. A return value of -1 implies that the current y-coordinate will be used.- Returns:
- The top y coordinate.
-
setTop
public void setTop(int y)
Set the top y-coordinate, a value of -1 implies that the current y-coordinate will be used.- Parameters:
y
- The top ycoordinate.
-
fitBoundingBox
public boolean fitBoundingBox()
A flag indicating if this page destination should just fit bounding box of the PDF.- Returns:
- true If the destination should fit just the bounding box.
-
setFitBoundingBox
public void setFitBoundingBox(boolean fitBoundingBox)
Set if this page destination should just fit the bounding box. The default is false.- Parameters:
fitBoundingBox
- A flag indicating if this should fit the bounding box.
-
-