Class PDFDestination

java.lang.Object
org.loboevolution.pdfview.PDFDestination

public class PDFDestination extends Object
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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Constant FIT=1
    static final int
    Constant FITB=5
    static final int
    Constant FITBH=6
    static final int
    Constant FITBV=7
    static final int
    Constant FITH=2
    static final int
    Constant FITR=4
    static final int
    Constant FITV=3
    static final int
    The known types of destination
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    PDFDestination(PDFObject pageObj, int type)
    Creates a new instance of PDFDestination
  • Method Summary

    Modifier and Type
    Method
    Description
    Get a destination from either an array (explicit destination), a name (named destination) or a string (name tree destination).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • PDFDestination

      protected PDFDestination(PDFObject pageObj, int type)
      Creates a new instance of PDFDestination
      Parameters:
      pageObj - the page object this destination refers to
      type - the type of page this object refers to
  • Method Details

    • getDestination

      public static PDFDestination getDestination(PDFObject pdfObj, PDFObject root) throws IOException
      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 destination
      root - the root of the PDF object tree
      Returns:
      a PDFDestination object.
      Throws:
      IOException - if any.