Leadtools.Forms.DocumentWriters Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
Protected Property
See Also 
Leadtools.Forms.DocumentWriters Namespace > PdfDocumentOptions Class : Protected Property



Gets or sets a value that indicate whether to create a protected PDF document.

Syntax

Visual Basic (Declaration) 
Public Property Protected As Boolean
Visual Basic (Usage)Copy Code
Dim instance As PdfDocumentOptions
Dim value As Boolean
 
instance.Protected = value
 
value = instance.Protected
C# 
public bool Protected {get; set;}
C++/CLI 
public:
property bool Protected {
   bool get();
   void set (bool value);
}

Return Value

true to create a protected PDF document; otherwise it is false.

Example

For an example, refer to PdfDocumentOptions.

Remarks

This is used when creating encrypted PDF documents. PDF documents can be encrypted by 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) using two methods:

  • Protected against viewing. PDF viewers will request a password from the user when the document is opened for viewing. This password is called the user password and you can protect the created PDF document by setting the Protected property to true and the UserPassword property to the password value.

  • Protected against editing. PDF editor will request a password from the user when the document is opened for editing. This password is called the owner password and you can protect the created PDF document by setting the Protected property to true and the OwnerPassword property to the password value.

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:

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

Note that if you set the Protected property to true, then a valid password must be set to either UserPassword or OwnerPassword or both.

Note that Protected is not supported when DocumentType is PdfDocumentType.PdfA.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

Leadtools.Forms.DocumentWriters requires a Document or Medical toolkit license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features