DS Server

DocumentSettings Object

Object|Introduced in 29.0

Description

The DocumentSettings class provides properties which inform about general document settings, such as author and title, contained in the document the user is currently working on (see TXTextControl.documentSettings).

Syntax

DocumentSettings

Examples

The following example demonstrates DocumentSettings in a practical document-editing workflow. The DocumentSettings class provides properties which inform about general document settings, such as author and title, contained in the document the user is currently working on (see TXTextControl.documentSettings).

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

TXTextControl.documentSettings.getAuthor(
    function(result) {
        console.log("get author result:", result);
    },
    onTxError
);

Members

Properties

PropertyDescription
embeddedFilesGets a collection of all files embedded in the document.

Methods

MethodDescription
getAuthorGets the author of the current document.
getCreationDateGets the document's creation date as a unix timestamp.
getCreatorApplicationGets the application, which has created the current document.
getDocumentBasePathGets a file path that is used to search for resources like images or hypertext links.
getDocumentKeywordsGets the current document's keywords. The property value is null, if there are no keywords contained in the document.
getDocumentSubjectGets the subject string of the current document.
getDocumentTitleGets the title string of the current document.
getUserDefinedDocumentPropertiesGets an object with all user-defined document properties contained in the current document.
setAuthorSets the author of the current document.
setCreationDateSets the document's creation date as a unix timestamp.
setCreatorApplicationSets the application, which has created the current document.
setDocumentBasePathSets a file path that is used to search for resources like images or hypertext links.
setDocumentKeywordsSets the current document's keywords.
setDocumentSubjectSets the subject string of the current document.
setDocumentTitleSets the title string of the current document.
setUserDefinedDocumentPropertiesSets an object with all user-defined document properties contained in the current document.