Caller-supplied credential for opening an encrypted PDF. Standard
security handlers authenticate by password; the public-key handler
(/Filter /Adobe.PubSec) authenticates by an X.509 certificate plus
its RSA private key. For unencrypted PDFs the credential is ignored
(the empty Password(b"") is the natural default).
Parses an unencrypted PDF, or an encrypted PDF whose user password is
empty. For encrypted PDFs that require a user- or owner-supplied
password, use parse_pdf_with_password; for /Filter /Adobe.PubSec
PDFs, use parse_pdf_with_certificate.
Parses an Adobe.PubSec-encrypted PDF using a recipient X.509
certificate (DER) and its matching PKCS#8 private key (DER). Returns
PdfError::InvalidPassword when no recipient blob in the PDF
unwraps with the supplied private key. For password-encrypted or
unencrypted documents this returns
PdfError::Unsupported — use parse_pdf_with_password /
parse_pdf respectively.
Parses an encrypted PDF with a caller-supplied password. The password
is tried first as the user password, then as the owner password; if
neither authenticates, the function returns
PdfError::InvalidPassword. For unencrypted documents the password
is ignored.