Javascript: RulerBarViewGenerator.getEnablePageMargins Method
Description
Gets whether page margins can be set via the ruler bar.
Syntax
<void> RulerBarViewGenerator.getEnablePageMargins(<RequestBooleanCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the property value. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates RulerBarViewGenerator.getEnablePageMargins in a practical document-editing workflow. It gets whether page margins can be set via the ruler bar.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.rulerBar.getEnablePageMargins(
function(result) {
if (result) {
console.log("get enable page margins is available.");
} else {
console.warn("get enable page margins is not available in the current document state.");
}
},
onTxError
);