Javascript: PageBorder.setMeasureFromText Method
Description
Sets whether the page border's distances are measured from the text.
Syntax
<void> PageBorder.setMeasureFromText(<boolean> measureFromText, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| measureFromText | Specifies whether the page border's distances are measured from the text. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates PageBorder.setMeasureFromText in a practical document-editing workflow. It sets whether the page border's distances are measured from the text.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function configureMeasureFromText(pageBorder) {
pageBorder.setMeasureFromText(
true,
function() {
console.log("set measure from text completed.");
},
onTxError
);
}