Class PdfDestination
PdfColor
defines a Color (it's a PdfArray
containing 3 values).- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
This is a possible destination typestatic final int
This is a possible destination typestatic final int
This is a possible destination typestatic final int
This is a possible destination typestatic final int
This is a possible destination typestatic final int
This is a possible destination typestatic final int
This is a possible destination typeprivate boolean
Is the indirect reference to a page already added?static final int
This is a possible destination type -
Constructor Summary
ConstructorsConstructorDescriptionPdfDestination
(int type) Constructs a newPdfDestination
.PdfDestination
(int type, float parameter) Constructs a newPdfDestination
.PdfDestination
(int type, float left, float top, float zoom) Constructs a newPdfDestination
.PdfDestination
(int type, float left, float bottom, float right, float top) Constructs a newPdfDestination
.PdfDestination
(String dest) Creates a PdfDestination based on a String. -
Method Summary
Modifier and TypeMethodDescriptionboolean
addPage
(PdfIndirectReference page) Adds the indirect reference of the destination page.boolean
hasPage()
Checks if an indirect reference to a page has been added.Methods inherited from class com.lowagie.text.pdf.PdfArray
add, add, add, add, addFirst, contains, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getElements, getPdfObject, isEmpty, listIterator, remove, remove, set, size, toPdf, toString
Methods inherited from class com.lowagie.text.pdf.PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
-
Field Details
-
XYZ
public static final int XYZThis is a possible destination type- See Also:
-
FIT
public static final int FITThis is a possible destination type- See Also:
-
FITH
public static final int FITHThis is a possible destination type- See Also:
-
FITV
public static final int FITVThis is a possible destination type- See Also:
-
FITR
public static final int FITRThis is a possible destination type- See Also:
-
FITB
public static final int FITBThis is a possible destination type- See Also:
-
FITBH
public static final int FITBHThis is a possible destination type- See Also:
-
FITBV
public static final int FITBVThis is a possible destination type- See Also:
-
status
private boolean statusIs the indirect reference to a page already added?
-
-
Constructor Details
-
PdfDestination
public PdfDestination(int type) Constructs a newPdfDestination
.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.
- Parameters:
type
- The destination type
-
PdfDestination
public PdfDestination(int type, float parameter) Constructs a newPdfDestination
.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.
- Parameters:
type
- the destination typeparameter
- a parameter to combined with the destination type
-
PdfDestination
public PdfDestination(int type, float left, float top, float zoom) Constructs a newPdfDestination
.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.
- Parameters:
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 value
-
PdfDestination
public PdfDestination(int type, float left, float bottom, float right, float top) Constructs a newPdfDestination
.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.
- Parameters:
type
- must be PdfDestination.FITRleft
- a parameterbottom
- a parameterright
- a parametertop
- a parameter- Since:
- iText0.38
-
PdfDestination
Creates a PdfDestination based on a String. Valid Strings are for instance the values returned by SimpleNamedDestination: "Fit", "XYZ 36 806 0",...- Parameters:
dest
- a String notation of a destination.- Since:
- iText 5.0
-
-
Method Details
-
hasPage
public boolean hasPage()Checks if an indirect reference to a page has been added.- Returns:
true
orfalse
-
addPage
Adds the indirect reference of the destination page.- Parameters:
page
- an indirect reference- Returns:
- true if the page reference was added
-