PdfStandardEncryptionOptions
OfficeIMO.Pdf
Options for generated PDF Standard password security.
Inheritance
- object
- PdfStandardEncryptionOptions
Usage
Explore 7 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 4
Accepted by parameters 3
- Method PdfCreateOptions.SetEncryption
- Method PdfDocumentSecurity.Encrypt
- Method PdfDocumentSecurity.Reencrypt
Constructors
public PdfStandardEncryptionOptions(string userPassword) #Creates Standard security options using the supplied document-open password.
Parameters
- userPassword string
Methods
public PdfStandardEncryptionOptions Clone() #Creates a deep copy of the encryption options.
Returns
PdfStandardEncryptionOptionspublic static PdfStandardEncryptionOptions ForPermissions(string ownerPassword, PdfStandardPermissions allowedPermissions) #Creates permissions-only security: readers can open without a password, while changing restrictions requires the supplied owner password.
Parameters
- ownerPassword string
- Non-empty password authorizing permission changes.
- allowedPermissions OfficeIMO.Pdf.PdfStandardPermissions
- Operations permitted to readers without the owner password.
Returns
PdfStandardEncryptionOptions Explicit permissions-only encryption options using AES-256 by default.Inherited Methods
Properties
public string UserPassword { get; set; } #Password required to open the generated PDF, or empty for options created by PdfStandardEncryptionOptions.ForPermissions. AES-256 accepts at most 4096 UTF-16 characters before normalization.
public string? OwnerPassword { get; set; } #Optional owner password. When omitted, the user password is reused. AES-256 accepts at most 4096 UTF-16 characters before normalization.
public bool HasDistinctOwnerPassword { get; } #Whether the owner password differs from the open password after the selected PDF algorithm's normalization and byte limit. False means an open-password holder also has owner access.
public PdfStandardEncryptionAlgorithm Algorithm { get; set; } #Encryption algorithm. AES-256 revision 6 is the default; RC4 requires explicit legacy selection.
public bool EncryptMetadata { get; set; } #Whether document metadata streams are encrypted. Defaults to true.
public IOfficeAesCryptographyProvider? AesCryptographyProvider { get; set; } #Optional synchronous AES provider used when the host does not expose platform AES-CBC, such as browser WebAssembly. Native platform cryptography remains the default when this property is null.
public int Permissions { get; set; } #Raw PDF Standard security permission bit mask. Defaults to allowing all standard operations.
public PdfStandardPermissions AllowedPermissions { get; set; } #Typed view over the Standard security permission mask.
Fields
public const int AllowAllPermissions #PDF permission bit mask allowing all standard operations.
-4