TX Text Control .NET Server

PageCollection Object

Object|Introduced in 28.0

Description

Contains all pages in a Text Control document or part of the document.

Syntax

PageCollection

Examples

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

MethodDescription
elementAtReturns the element at a specified index in the collection. (Inherited from Collection.)
forEachExecutes a callback function for each element. (Inherited from Collection.)
getCountGets the number of elements contained in the collection. (Inherited from Collection.)
getItemGets the Page containing the current text input position from the collection.
getItemAtTextPositionGets the page at a certain text input position.

Further Reading

  • Removing Empty Pages in TX Text Control with JavaScript –
  • TX Text Control .NET: Removing Empty Pages –