DS Server

Javascript: StreamType Enumeration

Enumeration

Description

Supported document stream formats exposed by the viewer.

Members

MemberDescription
InternalUnicodeFormatTX internal Unicode format (32).
MSWordMicrosoft Word-compatible format (64).
AdobePDFAdobe PDF format (512).
WordprocessingMLWordprocessingML format (1024).

Examples

The following example applies TXDocumentViewer.StreamType in a practical Document Viewer workflow.

async function exportCompletedFormAsPdf() {
    const saveSettings = {
        mergeFormFields: true,
        embedAnnotations: true
    };
    const saveResult = await TXDocumentViewer.saveDocument(
        TXDocumentViewer.StreamType.AdobePDF,
        saveSettings
    );
    const documentBase64 = await saveResult.base64();
    console.log("Exported PDF characters:", documentBase64.length);
    return documentBase64;
}