Javascript: PageMargins.getTop Method
Description
Gets the top margin of a TX Text Control document or document section.
Syntax
<void> PageMargins.getTop(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])Parameters
| Parameter | Description |
|---|---|
| callback | Receives the top margin of a TX Text Control document or document section. |
| errorCallback | Optional. Is called when the operation failed with an error. |
Examples
The following example demonstrates PageMargins.getTop in a practical document-editing workflow. It gets the top margin of a TX Text Control document or document section.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.pageMargins.getTop(
function(result) {
console.log("get top result:", result);
},
onTxError
);