Opait PDF Library
Public Member Functions | Static Public Member Functions | Properties | List of all members
Opait.Pdf.PdfSecurity Class Reference

Class manages security parameters for encrypted PDF documents. A PDF document can be encrypted to protect its contents from unauthorized access. Encryption applies to all strings and streams in the document’s PDF file, but not to other object types such as integers and boolean values, which are used primarily to convey information about the document’s structure rather than its content. Leaving these values unencrypted allows random access to the objects within a document, whereas encrypting the strings and streams protects the document’s substantive contents. More...

Public Member Functions

void PermitAll ()
 Allows all actions.
 
void PermitNone ()
 Disallow all actions.
 
 PdfSecurity ()
 Initializes a new instance of the PdfSecurity class.
 

Static Public Member Functions

static PdfSecurity Create (PdfOptions options)
 Initializes a new instance of the PdfSecurity class from attributes of a PdfOptions instance. More...
 

Properties

string UserPassword [get, set]
 Gets or sets tThe password used to open the encrypted PDF file.
 
string OwnerPassword [get, set]
 Gets or sets the password that grants full access, including the permission to set or change passwords, to the encrypted PDF file.
 
bool UserAuthenticated [get, set]
 Whether the user has been authenticated to open the file.
 
bool OwnerAuthenticated [get, set]
 Whether the owner has been authenticated to modify the file.
 
PdfEncryptionAlgorithm Algorithm [get, set]
 The encryption algorithm used by the security handler. Default: RC4
 
int KeyLength [get, set]
 Encryption key length in bits. Use 40 or 128 for RC4 and 128 or 256 for AES. Default: 128
 
bool EncryptMetadata [get, set]
 Indicates whether the document-level metadata stream is to be encrypted. Default value: true.
 
bool PermitPrint [get, set]
 Gets or sets a flag to allow document printing.
 
bool PermitModifyDocument [get, set]
 Gets or sets a flag to allow document modification.
 
bool PermitExtractContent [get, set]
 Gets or sets a flag to allow copy or otherwise extract text and graphics from the document.
 
bool PermitAnnotations [get, set]
 Gets or sets a flag to allow adding or modifying text annotations
 
bool PermitFormsFill [get, set]
 Gets or sets a flag to allow filling of interactive forms.
 
bool PermitAccessibilityExtractContent [get, set]
 Gets or sets a flag to allow extraction of text and graphics in support of accessibility
 
bool PermitAssembleDocument [get, set]
 Gets or sets a flag to allow assembly of the document (insert, rotate, or delete pages and create bookmarks or thumbnail images).
 
bool PermitFullQualityPrint [get, set]
 Gets or sets a flag to allow full quality document printing.
 

Detailed Description

Class manages security parameters for encrypted PDF documents. A PDF document can be encrypted to protect its contents from unauthorized access. Encryption applies to all strings and streams in the document’s PDF file, but not to other object types such as integers and boolean values, which are used primarily to convey information about the document’s structure rather than its content. Leaving these values unencrypted allows random access to the objects within a document, whereas encrypting the strings and streams protects the document’s substantive contents.

Member Function Documentation

◆ Create()

static PdfSecurity Opait.Pdf.PdfSecurity.Create ( PdfOptions  options)
static

Initializes a new instance of the PdfSecurity class from attributes of a PdfOptions instance.

Parameters
optionsThe security options.
Returns
An instance of the PdfSecurity class with the specified options.