Javascript: TableOfContents.getHasRightAlignedPageNumbers Method
Description
Gets a value specifying whether the page numbers in the table of contents are right-aligned.
Syntax
<void> TableOfContents.getHasRightAlignedPageNumbers(<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 TableOfContents.getHasRightAlignedPageNumbers in a practical document-editing workflow. It gets a value specifying whether the page numbers in the table of contents are right-aligned.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function inspectHasRightAlignedPageNumbers(tableOfContents) {
tableOfContents.getHasRightAlignedPageNumbers(
function(result) {
if (result) {
console.log("get has right aligned page numbers is available.");
} else {
console.warn("get has right aligned page numbers is not available in the current document state.");
}
},
onTxError
);
}