PdfReadOptions Class

The options of PdfDocument.Open. The limits bound the memory and the work of hostile files.

public sealed class PdfReadOptions

Constructors

NameDescription
PdfReadOptions()

PdfReadOptions()

PdfReadOptions.cs
public PdfReadOptions()

No documentation is available.

Properties

NameDescription
CertificateGets the certificate, with its private key, of a recipient of a document encrypted for certificates (the public-key security handler, /Adobe.PubSec). The default is null.
DefaultGets the default options.
MaxDecodedStreamLengthGets the maximum length of the decoded data of one stream, in bytes. The default is 256 MiB.
MaxNestingDepthGets the maximum depth of nested arrays and dictionaries. The default is 256.
PasswordGets the password of an encrypted document: the user or the owner password. The default is the empty password.

Gets the certificate, with its private key, of a recipient of a document encrypted for certificates (the public-key security handler, /Adobe.PubSec). The default is null.

public X509Certificate2? Certificate { get; init; }

Property value

X509Certificate2?

Gets the default options.

public static PdfReadOptions Default { get; }

Property value

PdfReadOptions

MaxDecodedStreamLength

PdfReadOptions.cs

Gets the maximum length of the decoded data of one stream, in bytes. The default is 256 MiB.

public long MaxDecodedStreamLength { get; init; }

Property value

long

Exceptions

ArgumentOutOfRangeException
The value is not positive.

MaxNestingDepth

PdfReadOptions.cs

Gets the maximum depth of nested arrays and dictionaries. The default is 256.

public int MaxNestingDepth { get; init; }

Property value

int

Exceptions

ArgumentOutOfRangeException
The value is not positive.

Gets the password of an encrypted document: the user or the owner password. The default is the empty password.

public string? Password { get; init; }

Property value

string?