Package org.loboevolution.pdfview
Class PDFDestination
java.lang.Object
org.loboevolution.pdfview.PDFDestination
Represents a destination in a PDF file. Destinations take 3 forms:
- An explicit destination, which contains a reference to a page as well as some stuff about how to fit it into the window.
- A named destination, which uses the PDF file's Dests entry in the document catalog to map a name to an explicit destination
- A string destintation, which uses the PDF file's Dests entry. in the name directory to map a string to an explicit destination.
All three of these cases are handled by the getDestination() method.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
ConstantFIT=1
static final int
ConstantFITB=5
static final int
ConstantFITBH=6
static final int
ConstantFITBV=7
static final int
ConstantFITH=2
static final int
ConstantFITR=4
static final int
ConstantFITV=3
static final int
The known types of destination -
Constructor Summary
ModifierConstructorDescriptionprotected
PDFDestination
(PDFObject pageObj, int type) Creates a new instance of PDFDestination -
Method Summary
Modifier and TypeMethodDescriptionstatic PDFDestination
getDestination
(PDFObject pdfObj, PDFObject root) Get a destination from either an array (explicit destination), a name (named destination) or a string (name tree destination).
-
Field Details
-
XYZ
public static final int XYZThe known types of destination- See Also:
-
FIT
public static final int FITConstantFIT=1
- See Also:
-
FITH
public static final int FITHConstantFITH=2
- See Also:
-
FITV
public static final int FITVConstantFITV=3
- See Also:
-
FITR
public static final int FITRConstantFITR=4
- See Also:
-
FITB
public static final int FITBConstantFITB=5
- See Also:
-
FITBH
public static final int FITBHConstantFITBH=6
- See Also:
-
FITBV
public static final int FITBVConstantFITBV=7
- See Also:
-
-
Constructor Details
-
PDFDestination
Creates a new instance of PDFDestination- Parameters:
pageObj
- the page object this destination refers totype
- the type of page this object refers to
-
-
Method Details
-
getDestination
Get a destination from either an array (explicit destination), a name (named destination) or a string (name tree destination).- Parameters:
pdfObj
- the PDFObject representing this destinationroot
- the root of the PDF object tree- Returns:
- a
PDFDestination
object. - Throws:
IOException
- if any.
-