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 and Description |
---|
XYZExplicitDestination(IDocument document,
int pageNumber,
double left,
double top,
double zoom)
Deprecated.
|
XYZExplicitDestination(int pageNumber,
double left,
double top,
double zoom)
Creates remote explicit destination.
|
XYZExplicitDestination(Page page,
double left,
double top,
double zoom)
Creates the instance and initializes it by DOM page object and visible parameters.
|
Modifier and Type | Method and Description |
---|---|
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.
|
static XYZExplicitDestination |
createDestinationToUpperLeftCorner(Page page)
Create destination to specified page.
|
static XYZExplicitDestination |
createDestinationToUpperLeftCorner(Page page,
double zoom)
Create destination to upper left corner of the specified page.
|
double |
getLeft()
Gets left horizontal coordinate of the upper-left corner of the window.
|
double |
getTop()
Gets top vertical coordinate of the upper-left corner of the window.
|
double |
getZoom()
Gets zoom factor.
|
String |
toString()
Converts the object state into string value.
|
createDestination, createDestination, createDestination, createDestination, getPage, getPageNumber
public XYZExplicitDestination(Page page, double left, double top, double zoom)
Creates the instance and initializes it by DOM page object and visible 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.@Deprecated public XYZExplicitDestination(IDocument document, int pageNumber, double left, double top, double zoom)
Creates remote explicit destination.
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.public XYZExplicitDestination(int pageNumber, double left, double top, double zoom)
Creates remote explicit destination.
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.public double getLeft()
Gets left horizontal coordinate of the upper-left corner of the window.
public double getTop()
Gets top vertical coordinate of the upper-left corner of the window.
public double getZoom()
Gets zoom factor.
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.
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.public static XYZExplicitDestination createDestinationToUpperLeftCorner(Page page, double zoom)
Create destination to upper left corner of the specified page.
page
- Destination page.zoom
- Zoom factor.public static XYZExplicitDestination createDestinationToUpperLeftCorner(Page page)
Create destination to specified page.
page
- Destination page.public String toString()
Converts the object state into string value. Example: "1 XYZ 100 200 3".
toString
in interface IAppointment
toString
in class ExplicitDestination