com.aspose.pdf

Interfaces

Classes

Enums

Exceptions

com.aspose.pdf

Class XYZExplicitDestination

  • All Implemented Interfaces:
    IAppointment


    public final class XYZExplicitDestination
    extends ExplicitDestination

    Represents explicit destination that displays the page with the coordinates (left, top) positioned at the upper-left corner of the window and the contents of the page magnified by the factor zoom. A null value for any of the parameters left, top, or zoom specifies that the current value of that parameter is to be retained unchanged. A zoom value of 0 has the same meaning as a null value.


    Document doc = new Document("example.pdf"); XYZExplicitDestination dest = (XYZExplicitDestination)doc.getOutlines().get_Item(1).getDestination(); String left = dest.getLeft(); String top = dest.getTop(); String zoom = dest.getZoom();

    • Constructor Detail

      • XYZExplicitDestination

        public XYZExplicitDestination(Page page,
                                      double left,
                                      double top,
                                      double zoom)

        Creates the instance and initializes it by DOM page object and visible parameters.

        Parameters:
        page - DOM page object.
        left - Left horizontal coordinate of the upper-left corner of the window.
        top - Top vertical coordinate of the upper-left corner of the window.
        zoom - Zoom factor.
      • XYZExplicitDestination

        @Deprecated
        public XYZExplicitDestination(IDocument document,
                                                   int pageNumber,
                                                   double left,
                                                   double top,
                                                   double zoom)
        Deprecated. 

        Creates remote explicit destination.

        Parameters:
        document - The parent document that contains this object.
        pageNumber - The destination page number of remote document.
        left - Left horizontal coordinate of the upper-left corner of the window.
        top - Top vertical coordinate of the upper-left corner of the window.
        zoom - Zoom factor.
      • XYZExplicitDestination

        public XYZExplicitDestination(int pageNumber,
                                      double left,
                                      double top,
                                      double zoom)

        Creates remote explicit destination.

        Parameters:
        pageNumber - The destination page number of remote document.
        left - Left horizontal coordinate of the upper-left corner of the window.
        top - Top vertical coordinate of the upper-left corner of the window.
        zoom - Zoom factor.
    • Method Detail

      • getLeft

        public double getLeft()

        Gets left horizontal coordinate of the upper-left corner of the window.

        Returns:
        double
      • getTop

        public double getTop()

        Gets top vertical coordinate of the upper-left corner of the window.

        Returns:
        double
      • getZoom

        public double getZoom()

        Gets zoom factor.

        Returns:
        double
      • createDestination

        public static XYZExplicitDestination createDestination(Page page,
                                                               double left,
                                                               double top,
                                                               double zoom,
                                                               boolean considerRotation)

        Create destination to specified location of the page considering page rotation if required.

        Parameters:
        page - Destination page.
        left - Left position on the page.
        top - Top position on the page.
        zoom - Zoom factor (0 for default).
        considerRotation - If true position will be recalculated according to page rotation.
        Returns:
        Destination object.
      • createDestinationToUpperLeftCorner

        public static XYZExplicitDestination createDestinationToUpperLeftCorner(Page page,
                                                                                double zoom)

        Create destination to upper left corner of the specified page.

        Parameters:
        page - Destination page.
        zoom - Zoom factor.
        Returns:
        Destination object.
      • createDestinationToUpperLeftCorner

        public static XYZExplicitDestination createDestinationToUpperLeftCorner(Page page)

        Create destination to specified page.

        Parameters:
        page - Destination page.
        Returns:
        Destination object.