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
Constructor | Description |
---|---|
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
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
page | Page | DOM page object. |
left | double | Left horizontal coordinate of the upper-left corner of the window. |
top | double | Top vertical coordinate of the upper-left corner of the window. |
zoom | double | Zoom 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:
Parameter | Type | Description |
---|---|---|
document | IDocument | The parent document that contains this object. |
pageNumber | int | The destination page number of remote document. |
left | double | Left horizontal coordinate of the upper-left corner of the window. |
top | double | Top vertical coordinate of the upper-left corner of the window. |
zoom | double | Zoom 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:
Parameter | Type | Description |
---|---|---|
pageNumber | int | The destination page number of remote document. |
left | double | Left horizontal coordinate of the upper-left corner of the window. |
top | double | Top vertical coordinate of the upper-left corner of the window. |
zoom | double | Zoom 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:
Parameter | Type | Description |
---|---|---|
page | Page | Destination page. |
left | double | Left position on the page. |
top | double | Top position on the page. |
zoom | double | Zoom factor (0 for default). |
considerRotation | boolean | If 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:
Parameter | Type | Description |
---|---|---|
page | Page | Destination page. |
zoom | double | Zoom factor. |
Returns: XYZExplicitDestination - Destination object.
createDestinationToUpperLeftCorner(Page page)
public static XYZExplicitDestination createDestinationToUpperLeftCorner(Page page)
Create destination to specified page.
Parameters:
Parameter | Type | Description |
---|---|---|
page | Page | Destination 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.