TX Text Control .NET Server

DocumentPermissions Object

Object|Introduced in 25.0

Description

The type of the documentPermissions property. The DocumentPermissions object provides settings determining how the document can be edited, when the EditMode is changed from Edit to ReadAndSelect.

Syntax

{
   readOnly: <boolean>,
   allowCopy: <boolean>,
   allowFormatting: <boolean>,
   allowFormattingStyles: <boolean>,
   allowPrinting: <boolean>,
   allowEditingFormFields: <boolean>
}

Examples

The following example demonstrates DocumentPermissions in a practical document-editing workflow. The type of the documentPermissions property. The DocumentPermissions object provides settings determining how the document can be edited, when the EditMode is changed from Edit to ReadAndSelect.

function inspectDocumentPermissions(documentPermissions) {
    console.log("read only:", documentPermissions.readOnly);
    console.log("allow copy:", documentPermissions.allowCopy);
    console.log("allow formatting:", documentPermissions.allowFormatting);
    console.log("allow formatting styles:", documentPermissions.allowFormattingStyles);
}

Members

Properties

PropertyDescription
allowCopySpecifies whether document content can be copied to the clipboard.
allowEditingFormFieldsGets or sets a value specifying whether form fields can be filled in.
allowFormattingGets or sets a value specifying whether the document can be formatted.
allowFormattingStylesGets or sets a value specifying whether formatting styles can be used to format the document.
allowPrintingGets or sets a value specifying whether the document can be printed.
readOnlyGets or sets a value specifying whether the document is read only.