TX Text Control .NET Server

Javascript: PageSize.setHeight Method

Method|Introduced in 26.0

Description

Sets the page height of a document or document section.

Syntax

<void> PageSize.setHeight(<number> height, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
height

The page height of a document or document section.

callback

Optional. Is called when the operation completed.

errorCallback

Optional. Is called when the operation failed with an error.

Examples

The following example demonstrates PageSize.setHeight in a practical document-editing workflow. It sets the page height of a document or document section.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.pageSize.setHeight(
    720,
    function() {
        console.log("set height completed.");
    },
    onTxError
);