public class Destination
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
e_Fit
The Constant e_Fit.
|
static int |
e_FitB
The Constant e_FitB.
|
static int |
e_FitBH
The Constant e_FitBH.
|
static int |
e_FitBV
The Constant e_FitBV.
|
static int |
e_FitH
The Constant e_FitH.
|
static int |
e_FitR
The Constant e_FitR.
|
static int |
e_FitV
The Constant e_FitV.
|
static int |
e_XYZ
View Destination Fit Types:
XYZ - Destination specified as upper-left corner point and a zoom factor.
|
Constructor and Description |
---|
Destination(Obj dest)
Create a Destination and initialize it using given Cos/SDF object.
|
Modifier and Type | Method and Description |
---|---|
static Destination |
createFit(Page page)
Create a new 'Fit' Destination.
|
static Destination |
createFitB(Page page)
Create a new 'FitB' Destination.
|
static Destination |
createFitBH(Page page,
double top)
Create a new 'FitBH' Destination.
|
static Destination |
createFitBV(Page page,
double left)
Create a new 'FitBV' Destination.
|
static Destination |
createFitH(Page page,
double top)
Create a new 'FitH' Destination.
|
static Destination |
createFitR(Page page,
double left,
double bottom,
double right,
double top)
Create a new 'FitR' Destination.
|
static Destination |
createFitV(Page page,
double left)
Create a new 'FitV' Destination.
|
static Destination |
createXYZ(Page page,
double left,
double top,
double zoom)
Create a new 'XYZ' Destination.
|
Obj |
getExplicitDestObj()
Get the explicit destination object.
|
int |
getFitType()
Get the Destination fit type.
|
Page |
getPage()
Get the destination page
|
Obj |
getSDFObj()
Get the SDFObj.
|
boolean |
isValid()
Checks if Destination is valid.
|
void |
setPage(Page page)
Modify the destination so that it refers to the new 'page' as the destination page.
|
public static final int e_XYZ
public static final int e_Fit
public static final int e_FitH
public static final int e_FitV
public static final int e_FitR
public static final int e_FitB
public static final int e_FitBH
public static final int e_FitBV
public Destination(Obj dest)
Note: The constructor does not copy any data, but is instead the logical equivalent of a type cast.
Note: Named destinations (in case 'dest' is a Name or a String) are automatically resolved to the explicit destination. If the name can't be resolved to the explicit destination dest.IsValid() will return false.
dest
- - a low-level (SDF/Cos) destination object. The low-level
destination can be either a named destination (i.e. a Name or a String)
or an explicit destination (i.e. an Array Obj). Please refer to section
8.2.1 'Destinations' in PDF Reference Manual for more details.public static Destination createXYZ(Page page, double left, double top, double zoom) throws PDFNetException
page
- the destination pageleft
- x coordinate of the destinationtop
- y coordinate of the destinationzoom
- the zoom factorPDFNetException
public static Destination createFit(Page page) throws PDFNetException
page
- the destination pagePDFNetException
public static Destination createFitH(Page page, double top) throws PDFNetException
page
- the destination pagetop
- the vertical coordinate to be at the top of the windowPDFNetException
public static Destination createFitV(Page page, double left) throws PDFNetException
page
- the destination pageleft
- the horizontal coordinate to be at the left edge of the windowPDFNetException
public static Destination createFitR(Page page, double left, double bottom, double right, double top) throws PDFNetException
page
- the destination pageleft
- the horizontal coordinate to be at the left edge of the windowbottom
- the vertical coordinate to be at the bottom of the windowright
- the horizontal coordinate to be at the right edge of the windowtop
- the vertical coordinate to be at the top of the windowPDFNetException
public static Destination createFitB(Page page) throws PDFNetException
page
- the destination pagePDFNetException
public static Destination createFitBH(Page page, double top) throws PDFNetException
page
- the destination pagetop
- the vertical coordinate to be at the top of the windowPDFNetException
public static Destination createFitBV(Page page, double left) throws PDFNetException
page
- the destination pageleft
- the horizontal coordinate to be at the left edge of the windowPDFNetException
public boolean isValid() throws PDFNetException
Note: If this method returns false the underlying SDF/Cos object is null and the Action object should be treated as null as well.
PDFNetException
public int getFitType() throws PDFNetException
PDFNetException
public Page getPage() throws PDFNetException
PDFNetException
public void setPage(Page page) throws PDFNetException
page
- The new page associated with this Destination.PDFNetException
public Obj getSDFObj()
public Obj getExplicitDestObj() throws PDFNetException
PDFNetException