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