XYZExplicitDestination

Inheritance: java.lang.Object, com.aspose.pdf.ExplicitDestination

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();

Constructors

ConstructorDescription
XYZExplicitDestination(Page page, double left, double top, double zoom)Creates the instance and initializes it by DOM page object and visible parameters.
XYZExplicitDestination(IDocument document, int pageNumber, double left, double top, double zoom)Creates remote explicit destination.
XYZExplicitDestination(int pageNumber, double left, double top, double zoom)Creates remote explicit destination.

Methods

MethodDescription
getLeft()Gets left horizontal coordinate of the upper-left corner of the window.
getTop()Gets top vertical coordinate of the upper-left corner of the window.
getZoom()Gets zoom factor.
createDestination(Page page, double left, double top, double zoom, boolean considerRotation)Create destination to specified location of the page considering page rotation if required.
createDestinationToUpperLeftCorner(Page page, double zoom)Create destination to upper left corner of the specified page.
createDestinationToUpperLeftCorner(Page page)Create destination to specified page.
toString()Converts the object state into string value.

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

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

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

Parameters:

ParameterTypeDescription
pagePageDOM page object.
leftdoubleLeft horizontal coordinate of the upper-left corner of the window.
topdoubleTop vertical coordinate of the upper-left corner of the window.
zoomdoubleZoom factor.

XYZExplicitDestination(IDocument document, int pageNumber, double left, double top, double zoom)

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

Creates remote explicit destination.

Parameters:

ParameterTypeDescription
documentIDocumentThe parent document that contains this object.
pageNumberintThe destination page number of remote document.
leftdoubleLeft horizontal coordinate of the upper-left corner of the window.
topdoubleTop vertical coordinate of the upper-left corner of the window.
zoomdoubleZoom factor.

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

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

Creates remote explicit destination.

Parameters:

ParameterTypeDescription
pageNumberintThe destination page number of remote document.
leftdoubleLeft horizontal coordinate of the upper-left corner of the window.
topdoubleTop vertical coordinate of the upper-left corner of the window.
zoomdoubleZoom factor.

getLeft()

public double getLeft()

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

Returns: double - double

getTop()

public double getTop()

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

Returns: double - double

getZoom()

public double getZoom()

Gets zoom factor.

Returns: double - double

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

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:

ParameterTypeDescription
pagePageDestination page.
leftdoubleLeft position on the page.
topdoubleTop position on the page.
zoomdoubleZoom factor (0 for default).
considerRotationbooleanIf true position will be recalculated according to page rotation.

Returns: XYZExplicitDestination - Destination object.

createDestinationToUpperLeftCorner(Page page, double zoom)

public static XYZExplicitDestination createDestinationToUpperLeftCorner(Page page, double zoom)

Create destination to upper left corner of the specified page.

Parameters:

ParameterTypeDescription
pagePageDestination page.
zoomdoubleZoom factor.

Returns: XYZExplicitDestination - Destination object.

createDestinationToUpperLeftCorner(Page page)

public static XYZExplicitDestination createDestinationToUpperLeftCorner(Page page)

Create destination to specified page.

Parameters:

ParameterTypeDescription
pagePageDestination page.

Returns: XYZExplicitDestination - Destination object.

toString()

public String toString()

Converts the object state into string value. Example: “1 XYZ 100 200 3”.

Returns: java.lang.String - String value representing object state.