Class ViewDestination

java.lang.Object
com.datalogics.PDFL.ViewDestination

public class ViewDestination extends Object
Represents a particular view of a page in a document. A destination describes a place in the PDF document where the user will be taken in response to clicking a hyperlink. The destination defines where a bookmark or hyperlink points to.

The ViewDestination contains a reference to a page, a place (rectangle) on that page, and information specifying how to adjust the view to fit the window's size and shape.

  • Field Details

    • NULL_VALUE

      public static final double NULL_VALUE
      Constant used for "null" values in destination rectangles or zoom.
      See Also:
  • Constructor Details

    • ViewDestination

      public ViewDestination(Document doc, int pageNum, String fitType, Rect r, double zoom)
      General purpose constructor: construct with all elements

      Parameters:
      doc - Containing document
      pageNum - Target page number
      fitType - Fit Type must be: "XYZ", "Fit", "FitH", "FitV", "FitR", "FitB", "FitBH", or "FitBV".
      r - Target rectangle
      zoom - Zoom level
  • Method Details

    • delete

      public void delete()
    • equals

      public boolean equals(Object rhs)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getPageNumber

      public int getPageNumber()
      The page number of the destination

    • setPageNumber

      public void setPageNumber(int ViewDestPageNum)
      Set the page number of the destination starting at 0
    • getFitType

      public String getFitType()
      The fit type.

    • setFitType

      public void setFitType(String ViewDestFitType)
      Set the fit type for the view

    • getDestRect

      public Rect getDestRect()
      The destination rectangle.

    • setDestRect

      public void setDestRect(Rect ViewDestRect)
      Set the destination rectangle of the view.
    • getZoom

      public double getZoom()
      The zoom factor for the destination.

    • setZoom

      public void setZoom(double ViewDestZoomFactor)
      Set the zoom factor for the destination.
    • getPDFArray

      public PDFArray getPDFArray()
      Retrieve the PDFObject representation of this object