public class Destination
extends java.lang.Object
The Destination class defines a particular view of a
PDF document consisting of the following items:
Destination can be associated with outline items, annotations, or actions. In each case the destination specifies the view of the document to be presented when one of the respective objects is activated.
The Destination class currently only supports the Destination syntaxes, [page /XYZ left top zoom], other syntax will be added in future releases. The syntax [page /XYZ left top zoom] is defined as follows:
A null value for left, top or zoom specifies that the current view values will be unchanged when navigating to the specified page.
Annotation,
OutlineItem,
Action| Modifier and Type | Field and Description |
|---|---|
static Name |
D_KEY |
static Name |
TYPE_FIT |
static Name |
TYPE_FITB |
static Name |
TYPE_FITBH |
static Name |
TYPE_FITBV |
static Name |
TYPE_FITH |
static Name |
TYPE_FITR |
static Name |
TYPE_FITV |
static Name |
TYPE_XYZ |
| Constructor and Description |
|---|
Destination(Library l,
java.lang.Object h)
Creates a new instance of a Destination.
|
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<java.lang.Object> |
destinationSyntax(Reference page,
Name type)
Utility for creating a /Fit or FitB syntax vector.
|
static java.util.List<java.lang.Object> |
destinationSyntax(Reference page,
Name type,
java.lang.Object offset)
Utility for creating a /FitH, /FitV, /FitBH or /FitBV syntax vector.
|
static java.util.List<java.lang.Object> |
destinationSyntax(Reference page,
java.lang.Object type,
java.lang.Object left,
java.lang.Object top,
java.lang.Object zoom)
Utility for creating a /XYZ syntax vector.
|
static java.util.List<java.lang.Object> |
destinationSyntax(Reference page,
java.lang.Object type,
java.lang.Object left,
java.lang.Object bottom,
java.lang.Object right,
java.lang.Object top)
Utility for creating a /FitR syntax vector.
|
java.lang.Float |
getBottom()
Bottom coordinate of a zoom box, if present left, right and top should
also be available.
|
java.lang.Object |
getEncodedDestination()
Get the destination properties encoded in post script form.
|
java.lang.Float |
getLeft()
Gets the left offset from the top, left position of the page specified by
this destination.
|
Name |
getNamedDestination()
Gets the name of the named destination.
|
java.lang.Object |
getObject()
Get the dictionary object, name, string or array.
|
Reference |
getPageReference()
Gets the Page Reference specified by the destination.
|
Reference |
getRef()
Gets the page reference represented by this destination
|
java.lang.Float |
getRight()
Right coordinate of a zoom box, if present bottom, left and top should
also be available.
|
java.lang.Float |
getTop()
Gets the top offset from the top, left position of the page specified by
this destination.
|
Name |
getType()
Gets the type used in a vector of destination syntax.
|
java.lang.Float |
getZoom()
Gets the zoom level specifed by the destination.
|
void |
setDestinationSyntax(java.util.List destinationSyntax)
Sets the destination syntax to the specified value.
|
void |
setNamedDestination(Name dest)
Sets the named destination as a Named destination.
|
java.lang.String |
toString()
Returns a summary of the annotation dictionary values.
|
public static final Name D_KEY
public static final Name TYPE_XYZ
public static final Name TYPE_FIT
public static final Name TYPE_FITH
public static final Name TYPE_FITV
public static final Name TYPE_FITR
public static final Name TYPE_FITB
public static final Name TYPE_FITBH
public static final Name TYPE_FITBV
public Destination(Library l, java.lang.Object h)
l - document library.h - Destination dictionary entries.public java.lang.Object getObject()
public Name getNamedDestination()
public void setNamedDestination(Name dest)
dest - destination to associate with.public void setDestinationSyntax(java.util.List destinationSyntax)
destinationSyntax - new vector of destination syntax.public static java.util.List<java.lang.Object> destinationSyntax(Reference page, Name type)
page - destination page pointer.type - type of destionationpublic static java.util.List<java.lang.Object> destinationSyntax(Reference page, Name type, java.lang.Object offset)
page - destination page pointer.type - type of destionationoffset - offset coordinate value in page space for specified dest type.public static java.util.List<java.lang.Object> destinationSyntax(Reference page, java.lang.Object type, java.lang.Object left, java.lang.Object top, java.lang.Object zoom)
page - destination page pointer.type - type of destionationleft - offset coordinate value in page space for specified dest type.top - offset coordinate value in page space for specified dest type.zoom - page zoom, 0 or null indicates no zoom.public static java.util.List<java.lang.Object> destinationSyntax(Reference page, java.lang.Object type, java.lang.Object left, java.lang.Object bottom, java.lang.Object right, java.lang.Object top)
page - destination page pointer.type - type of destionationleft - offset coordinate value in page space for specified dest type.top - offset coordinate value in page space for specified dest type.bottom - offset coordinate value in page space for specified dest type.right - offset coordinate value in page space for specified dest type.public Reference getPageReference()
public java.lang.Float getLeft()
public java.lang.Float getTop()
public java.lang.Float getZoom()
public Reference getRef()
public Name getType()
public java.lang.Float getBottom()
public java.lang.Float getRight()
public java.lang.Object getEncodedDestination()
public java.lang.String toString()
toString in class java.lang.Object