org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination
public class: PDPageFitWidthDestination [javadoc |
source]
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:
PDDestinationOrAction
This represents a destination to a page at a y location and the width is magnified
to just fit on the screen.
Field Summary |
---|
protected static final String | TYPE | The type of this destination. |
protected static final String | TYPE_BOUNDED | The type of this destination. |
Methods from org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDDestination: |
---|
create, toString |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from org.apache.pdfbox.pdmodel.interactive.documentnavigation.destination.PDPageFitWidthDestination Detail: |
public boolean fitBoundingBox() {
return TYPE_BOUNDED.equals( array.getName( 1 ) );
}
A flag indicating if this page destination should just fit bounding box of the PDF. |
public int getTop() {
return array.getInt( 2 );
}
Get the top y coordinate. A return value of -1 implies that the current y-coordinate
will be used. |
public void setFitBoundingBox(boolean fitBoundingBox) {
array.growToSize( 2 );
if( fitBoundingBox )
{
array.setName( 1, TYPE_BOUNDED );
}
else
{
array.setName( 1, TYPE );
}
}
Set if this page destination should just fit the bounding box. The default is false. |
public void setTop(int y) {
array.growToSize( 3 );
if( y == -1 )
{
array.set( 2, (COSBase)null );
}
else
{
array.setInt( 2, y );
}
}
Set the top y-coordinate, a value of -1 implies that the current y-coordinate
will be used. |