Javascript: PageBorder.getLeftDistance Method
Description
Gets the distance, in twips, of the left border line either from the edge of the page or from the text, depending on the MeasureFromText.
Syntax
<void> PageBorder.getLeftDistance(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | the distance, in twips, of the left border line either from the edge of the page or from the text, depending on the MeasureFromText. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates PageBorder.getLeftDistance in a practical document-editing workflow. It gets the distance, in twips, of the left border line either from the edge of the page or from the text, depending on the MeasureFromText.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectLeftDistance(pageBorder) {
pageBorder.getLeftDistance(
function(result) {
console.log("get left distance result:", result);
},
onTxError
);
}