public class PdfDestination extends PdfArray
PdfColor
defines a Color (it's a PdfArray
containing 3 values).PdfDictionary
Modifier and Type | Field and Description |
---|---|
static int |
FIT
This is a possible destination type
|
static int |
FITB
This is a possible destination type
|
static int |
FITBH
This is a possible destination type
|
static int |
FITBV
This is a possible destination type
|
static int |
FITH
This is a possible destination type
|
static int |
FITR
This is a possible destination type
|
static int |
FITV
This is a possible destination type
|
static int |
XYZ
This is a possible destination type
|
Constructor and Description |
---|
PdfDestination(int type)
Constructs a new
PdfDestination . |
PdfDestination(int type,
float parameter)
Constructs a new
PdfDestination . |
PdfDestination(int type,
float left,
float top,
float zoom)
Constructs a new
PdfDestination . |
PdfDestination(int type,
float left,
float bottom,
float right,
float top)
Constructs a new
PdfDestination . |
PdfDestination(String dest)
Creates a PdfDestination based on a String.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addPage(PdfIndirectReference page)
Adds the indirect reference of the destination page.
|
boolean |
hasPage()
Checks if an indirect reference to a page has been added.
|
add, add, add, add, addFirst, contains, getArrayList, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getElements, getPdfObject, isEmpty, listIterator, remove, set, size, toPdf, toString
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
public static final int XYZ
public static final int FIT
public static final int FITH
public static final int FITV
public static final int FITR
public static final int FITB
public static final int FITBH
public static final int FITBV
public PdfDestination(int type)
PdfDestination
.
If type equals FITB, the bounding box of a page will fit the window of the Reader. Otherwise the type will be set to FIT so that the entire page will fit to the window.
type
- The destination typepublic PdfDestination(int type, float parameter)
PdfDestination
.
If type equals FITBH / FITBV, the width / height of the bounding box of a page will fit the window of the Reader. The parameter will specify the y / x coordinate of the top / left edge of the window. If the type equals FITH or FITV the width / height of the entire page will fit the window and the parameter will specify the y / x coordinate of the top / left edge. In all other cases the type will be set to FITH.
type
- the destination typeparameter
- a parameter to combined with the destination typepublic PdfDestination(int type, float left, float top, float zoom)
PdfDestination
.
Display the page, with the coordinates (left, top) positioned at the top-left corner of the window and the contents of the page magnified by the factor zoom. A negative value for any of the parameters left or top, or a zoom value of 0 specifies that the current value of that parameter is to be retained unchanged.
type
- must be a PdfDestination.XYZleft
- the left value. Negative to place a nulltop
- the top value. Negative to place a nullzoom
- The zoom factor. A value of 0 keeps the current valuepublic PdfDestination(int type, float left, float bottom, float right, float top)
PdfDestination
.
Display the page, with its contents magnified just enough to fit the rectangle specified by the coordinates left, bottom, right, and top entirely within the window both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the rectangle within the window in the other dimension.
type
- must be PdfDestination.FITRleft
- a parameterbottom
- a parameterright
- a parametertop
- a parameterpublic PdfDestination(String dest)
dest
- a String notation of a destination.public boolean hasPage()
true
or false
public boolean addPage(PdfIndirectReference page)
page
- an indirect referenceCopyright © 2020. All rights reserved.