DS Server

Javascript: TXTextControl.ImageFormat Enumeration

Enumeration|Introduced in 28.0

Description

Specifies the file format of an image.

Members

MemberDescription
BmpBitmap image format.
EmfEnhanced metafile image format.
GifGraphics Interchange Format image format.
JpegJoint Photographic Experts Group image format.
PngW3C Portable Network Graphics image format.
TiffTagged Image File Format image format.
WmfWindows metafile image format.

Examples

The following example uses TXTextControl.ImageFormat.Bmp (bitmap image format.) in a document-editing workflow.

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

function applyImageFormat(page) {
    page.getImage(
        TXTextControl.ImageFormat.Bmp,
        100,
        TXTextControl.PageContent.Background,
        function(result) {
            console.log("get image result:", result);
        },
        onTxError
    );
}