public class PDFDestination
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ZOOM_FACTOR
A specific zoom factor is used.
|
static int |
ZOOM_FITCONTENT
Fit the whole content of page on the screen.
|
static int |
ZOOM_FITCONTENTHEIGHT
Fit the content height of page on the screen.
|
static int |
ZOOM_FITCONTENTWIDTH
Fit the content width of page on the screen.
|
static int |
ZOOM_FITHEIGHT
Fit the height of page on the screen.
|
static int |
ZOOM_FITPAGE
Fit the whole page on the screen.
|
static int |
ZOOM_FITRECT
Fit the particular rectangle on the screen.
|
static int |
ZOOM_FITWIDTH
Fit the width of page on the screen.
|
Modifier and Type | Method and Description |
---|---|
static PDFDestination |
create(int pageIndex,
int zoomMode,
float[] params)
create a new
PDFDestination object with the specified page index,
zoom mode and params. |
int |
getPageIndex()
Get page index of destination.
|
float[] |
getParams()
Get parameters of destination.
|
int |
getZoomMode()
Get zoom mode of destination.
|
void |
setPageIndex(int pageIndex)
Set page index of destination.
|
void |
setParams(float[] params)
Set parameters of destination.
|
void |
setZoomMode(int zoomMode)
Set zoom mode of destination.
|
public static final int ZOOM_FACTOR
public static final int ZOOM_FITPAGE
public static final int ZOOM_FITWIDTH
public static final int ZOOM_FITHEIGHT
public static final int ZOOM_FITRECT
public static final int ZOOM_FITCONTENT
public static final int ZOOM_FITCONTENTWIDTH
public static final int ZOOM_FITCONTENTHEIGHT
public static PDFDestination create(int pageIndex, int zoomMode, float[] params) throws PDFException
PDFDestination
object with the specified page index,
zoom mode and params.pageIndex
- A zero-based index for page.zoomMode
- Zoom mode.params
- Params used to specify the position and zoom factor inside the
page. According to the zoomMode
parameter,
different members of the params are used:
ZOOM_FACTOR
: 0: left, 1: top, 2:
zoom factorZOOM_FITPAGE
: noneZOOM_FITWIDTH
: 0: topZOOM_FITHEIGHT
: 0: leftZOOM_FITRECT
: 0: left, 1: top, 2:
bottom, 3: rightZOOM_FITCONTENT
: noneZOOM_FITCONTENTWIDTH
: 0: topZOOM_FITCONTENTHEIGHT
: 0: leftPDFDestination
object.PDFException
- For more definitions please see definitions
PDFException.ERRCODE_XXX
.PDFException
public int getPageIndex()
public void setPageIndex(int pageIndex)
pageIndex
- The specified page index.public int getZoomMode()
public void setZoomMode(int zoomMode) throws PDFException
zoomMode
- The specified zoom mode.PDFException
- For more definitions please see definitions
PDFException.ERRCODE_XXX
.PDFException
public float[] getParams()
ZOOM_FACTOR
: 0: left, 1: top, 2: zoom factor. ZOOM_FITPAGE
: noneZOOM_FITWIDTH
: 0: topZOOM_FITHEIGHT
: 0: leftZOOM_FITRECT
: 0: left, 1: top, 2: bottom, 3:
rightZOOM_FITCONTENT
: noneZOOM_FITCONTENTWIDTH
: 0: topZOOM_FITCONTENTHEIGHT
: 0: leftpublic void setParams(float[] params) throws PDFException
params
- The parameters used to specify the position and zoom factor
inside the page. The number is between 1 to 4.
According to zoom mode, different members of the params are
used:
ZOOM_FACTOR
: 0: left, 1: top, 2:
zoom factorZOOM_FITPAGE
: noneZOOM_FITWIDTH
: 0: topZOOM_FITHEIGHT
: 0: leftZOOM_FITRECT
: 0: left, 1: top, 2:
bottom, 3: rightZOOM_FITCONTENT
: noneZOOM_FITCONTENTWIDTH
: 0: topZOOM_FITCONTENTHEIGHT
: 0: leftPDFException
- For more definitions please see definitions
PDFException.ERRCODE_XXX
.PDFException