PdfPassword Class

Definition

A password for the standard security handler, the user or the owner password.

public sealed class PdfPassword : PdfCredentials

Remarks

ISO 32000-2 §7.6.4. Given as text, the password is encoded the way the document's revision requires: PDFDocEncoding for revisions 2 to 4 (§7.6.4.3.2, step a; when that fails, Latin-1, as other readers do), SASLprep and UTF-8 truncated to 127 bytes for revision 6 and later (§7.6.4.1), UTF-8 for the deprecated revision 5. Given as bytes, it is used as is, for passwords in a legacy code page.

SASLprep's normalization (NFKC) uses the platform's Unicode data; in an application built with invariant globalization it is not available, so a revision 6 password must then be given in its normalized form (what keyboards produce for most scripts). The mapping steps (non-ASCII spaces to SPACE, soft hyphens and joiners to nothing) apply everywhere.

The empty password is the default user password, which readers always try first.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Constructors (2)

Properties (2)

Methods (1)