PageCollection Object
Description
Contains all pages in a Text Control document or part of the document.
Syntax
PageCollectionExamples
The following example demonstrates PageCollection in a practical document-editing workflow. It contains all pages in a Text Control document or part of the document.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
TXTextControl.pages.getItem(
function(page) {
if (!page) {
console.warn("No page was returned.");
return;
}
console.log("get item result:", page);
},
onTxError
);Members
Methods
| Method | Description |
|---|---|
| elementAt | Returns the element at a specified index in the collection. (Inherited from Collection.) |
| forEach | Executes a callback function for each element. (Inherited from Collection.) |
| getCount | Gets the number of elements contained in the collection. (Inherited from Collection.) |
| getItem | Gets the Page containing the current text input position from the collection. |
| getItemAtTextPosition | Gets the page at a certain text input position. |