DS Server

SaveDocumentResult Object

Object|Introduced in 23.0

Description

The callback function argument for the saveDocument and the saveSelection functions.

Syntax

{
   data: <string>,
   streamType: <StreamType>,
   bytesWritten: <number>
}

Examples

The following example demonstrates SaveDocumentResult in a practical document-editing workflow. The callback function argument for the saveDocument and the saveSelection functions.

function inspectSaveDocumentResult(saveDocumentResult) {
    console.log("data:", saveDocumentResult.data);
    console.log("stream type:", saveDocumentResult.streamType);
    console.log("bytes written:", saveDocumentResult.bytesWritten);
}

Members

Properties

PropertyDescription
bytesWrittenSpecifies the number of bytes written during a save operation.
dataThe Document data. Contains base64 encoded binary data in case of binary document formats (PDF or DOCX, for example) and plain text in case of text based document formats (HTML or RTF, for example).
streamTypeSpecifies one of the StreamType values.