TX Text Control .NET Server

Javascript: Image.getVerticalScaling Method

Method|Introduced in 28.0

Description

Gets an images's vertical scaling factor in percent.

Syntax

<void> Image.getVerticalScaling(<RequestNumberCallback> callback, [<ErrorCallback> errorCallback])

Parameters

ParameterDescription
callback

Receives the current property value.

errorCallback

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

Examples

The following example demonstrates Image.getVerticalScaling in a practical document-editing workflow. It gets an images's vertical scaling factor in percent.

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

TXTextControl.images.getItem(function(image) {
    if (!image) {
        console.warn("No image is available at the current input position.");
        return;
    }

    image.getVerticalScaling(
        function(result) {
            console.log("get vertical scaling result:", result);
        },
        onTxError
    );
}, onTxError);