PdfReadOptions Class
The options of PdfDocument.Open. The limits bound the memory and the work of hostile files.
public sealed class PdfReadOptionsConstructors
| Name | Description |
|---|---|
| PdfReadOptions() |
PdfReadOptions()
PdfReadOptions.cspublic PdfReadOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| AllowFullDownload | Gets a value indicating whether a document opened over HTTP (PdfDocument.OpenAsync) can download the whole file: to repair a damaged file, which scans it, or to look for a header beyond the first kilobyte. When it is false, such a file throws UnsupportedPdfFeatureException. The default is true. |
| Certificate | 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. |
| Default | Gets the default options. |
| LoadAllObjects | Gets a value indicating whether the document reads all its objects, its page tree and the data of its streams when it is opened, so that PdfDocument.Diagnostics lists every problem of the file (PdfDocument.ValidateStructure). The default is false: the objects are read when they are first used. |
| MaxDecodedStreamLength | Gets the maximum length of the decoded data of one stream, in bytes. The default is 256 MiB. |
| MaxNestingDepth | Gets the maximum depth of nested arrays and dictionaries. The default is 256. |
| Password | Gets the password of an encrypted document: the user or the owner password. The default is the empty password. |
AllowFullDownload
PdfReadOptions.csGets a value indicating whether a document opened over HTTP (PdfDocument.OpenAsync) can download the whole file: to repair a damaged file, which scans it, or to look for a header beyond the first kilobyte. When it is false, such a file throws UnsupportedPdfFeatureException. The default is true.
public bool AllowFullDownload { get; init; }Property value
Certificate
PdfReadOptions.csGets 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
Default
PdfReadOptions.csLoadAllObjects
PdfReadOptions.csGets a value indicating whether the document reads all its objects, its page tree and the data of its streams when it is opened, so that PdfDocument.Diagnostics lists every problem of the file (PdfDocument.ValidateStructure). The default is false: the objects are read when they are first used.
public bool LoadAllObjects { get; init; }Property value
MaxDecodedStreamLength
PdfReadOptions.csGets the maximum length of the decoded data of one stream, in bytes. The default is 256 MiB.
public long MaxDecodedStreamLength { get; init; }MaxNestingDepth
PdfReadOptions.csGets the maximum depth of nested arrays and dictionaries. The default is 256.
public int MaxNestingDepth { get; init; }