isProtected Property (original) (raw)

Summary

Indicates whether to create a protected PDF document.

Syntax

TypeScript

JavaScript

Object.defineProperty(PdfDocumentOptions.prototype, 'isProtected', get: function(), set: function(value) )

isProtected: boolean; 

Property Value

true to create a protected PDF document; otherwise, false. Default value is false.

Remarks

This is used when creating encrypted PDF documents. PDF documents can be encrypted at two levels: low (40-bit RC4) and high (128-bit RC4). To change the encryption level, use the EncryptionMode property.

PDF documents can be protected (secured) in two different ways, as follows:

When a PDF document is protected against editing (through the use of an owner password), an encryption level and owner access rights can be granted or denied in the resulting document. The following table lists the PDF access rights supported by the LEADTOOLS Document Writers:

Encryption Owner Access Right
Low (PdfDocumentOptions.EncryptionMode set toPdfDocumentEncryptionMode.RC40Bit) Printing (PdfDocumentOptions.PrintEnabled), Copying text (PdfDocumentOptions.CopyEnabled), Editing (PdfDocumentOptions.EditEnabled) and Annotations and comments (PdfDocumentOptions.AnnotationsEnabled).
High (PdfDocumentOptions.EncryptionMode set toPdfDocumentEncryptionMode.RC128Bit) Adds the following to owner access rights supported by low level encryption: High quality printing (PdfDocumentOptions.HighQualityPrintEnabled) and adding/removing pagesPdfDocumentOptions.AssemblyEnabled.

Note that Owner Access Rights (UserPassword and OwnerPassword) have effect only if you set the IsProtected property to true.

Note that IsProtected is not supported when the DocumentType isPdfDocumentType.PdfA.