WithPassword(String?) Method

Definition

Namespace Broadside
Assembly Broadside.dll

Offers password to every encrypted document opened without credentials of its own.

public PdfOptions WithPassword(string? password)

Parameters

password
String

The user or owner password; null or empty for the default user password only.

Returns

PdfOptions
These options.

Remarks

ISO 32000-2 §7.6.4.1. To give each document its own password, pass it to Open(String, PdfCredentials) instead. A password that opens neither as the user nor as the owner password makes opening throw PdfPasswordException.