[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.Security.EncryptOptions.PermissionOptions

EncryptOptions.PermissionOptions Class

Defines the document permission options. If the document is opened using UserPassword, these permissions will be enforced, preventing the user from performing actions restricted by the specified options.

Inheritance
EncryptOptions.PermissionOptions
Namespace: GrapeCity.Documents.Pdf.Security
Assembly: DS.Documents.Pdf.dll
Syntax
public class EncryptOptions.PermissionOptions
Public Class EncryptOptions.PermissionOptions

Constructors

Name Description
PermissionOptions(byte[])

Initializes a new instance of the EncryptOptions.PermissionOptions class.

The two constructors PermissionOptions(string) and PermissionOptions(byte[]) allow to define the password as a string or as an array of bytes.

According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so GcPdf cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using this constructor.
PermissionOptions(string)

Initializes a new instance of the EncryptOptions.PermissionOptions class.

The two constructors PermissionOptions(string) and PermissionOptions(byte[]) allow to define the password as a string or as an array of bytes.

According to the PDF specification, a string password should be converted to an array of bytes using the system code page (if the standard security handler with revision 4 or less is used). In some environments the system code page is unavailable, so GcPdf cannot perform this conversion. If the password string only contains ASCII chars, this does not present a problem. But if the password string contains non-ASCII Unicode characters, it is up to the developer to perform the conversion and set the password using PermissionOptions(byte[]) constructor.

Properties

Name Description
CopyContent

Gets or sets a value indicating whether a document's content can be copied or extracted.

EditingPermissions

Gets or sets a value controlling how a document can be edited.

OwnerPassword

Gets or sets the password required to change permissions of a PDF document as a string.

OwnerPasswordBytes

Gets or sets the password required to change permissions of a PDF document as a byte array.

PrintingPermissions

Gets or sets a value controlling how a document can be printed.