Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfLoadOptions

OfficeIMO.Pdf

Namespace
OfficeIMO.Pdf
Assembly
OfficeIMO.Pdf
Source revision
12511d2fa560 with working tree changes
Modifiers
sealed

Options for controlling PDF reading/decoding behavior.

Inheritance

  • object
  • PdfLoadOptions

Usage

Explore 89 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 79

Constructors

public PdfLoadOptions() #

Methods

Clone 2 overloads
public PdfLoadOptions Clone() #

Snapshots all load settings and resource limits. The caller-supplied AES provider and public-key decryption options are retained.

public PdfLoadOptions Clone(long? maximumInputBytes, string? passwordOverride) #

Copies the complete policy, optionally tightening its input ceiling and overriding the open password.

Parameters

maximumInputBytes long? required
passwordOverride string? required

Properties

public static PdfLoadOptions UntrustedDefaults { get; } #

Creates strict parsing settings with bounded budgets for documents from outside. Single-object size and token count, and content operations and operands keep tighter limits here than the defaults, which are sized for valid real-world files.

public PdfParsingMode ParsingMode { get; init; } #

Structural parsing policy. Lenient recovery is the compatibility default and always produces a repair report.

public PdfReadLimits Limits { get; init; } #

Resource budgets for object scanning and raw stream allocation.

public string? Password { get; init; } #

Password used to open encrypted PDFs. The same value is tried as user and owner password for Standard security handler files. For Standard security revisions 5 and 6, passwords longer than 4096 UTF-16 characters are rejected before normalization.

public IOfficeAesCryptographyProvider? AesCryptographyProvider { get; init; } #

Optional synchronous AES provider used to open Standard-security PDFs when platform AES-CBC is unavailable.

public PdfPublicKeyDecryptionOptions? PublicKeyDecryption { get; init; } #

Recipient certificates and the security provider used to open PDFs encrypted with the public-key security handler (/Filter /Adobe.PubSec, /SubFilter adbe.pkcs7.s3, s4 or s5).

public PdfPermissionPolicy PermissionPolicy { get; init; } #

Controls whether authenticated user-password permission restrictions are enforced. Ignoring restrictions still requires the PDF to be successfully decrypted with a valid password.

public bool PreferToUnicode { get; init; } #

Prefer decoding via ToUnicode CMap when available. Default: true.

public bool UseWinAnsiFallback { get; init; } #

Fallback to WinAnsi (Windows-1252) when no ToUnicode is present. Default: true.

public bool AdjustKerningFromTJ { get; init; } #

Adjust X position using TJ kerning values (thousandths of font size). Default: true.

public bool IncludeArtifactText { get; init; } #

Includes text inside PDF artifact marked-content sequences, such as page headers, footers, and chart decorations. Default: false, which returns logical document text.

public PdfReadProfile Profile { get; init; } #

Semantic reconstruction profile. Structured is the default public contract.

public bool IncludeImages { get; init; } #

Includes image placements, image-region analysis and extracted image payloads. Default: true. False retains native text, including text inside Form XObjects, without materializing image assets.

public bool IncludeFormWidgets { get; init; } #

Includes logical AcroForm widget projections. Default: true. False retains bounded source field facts and values while omitting secondary widget objects.

public bool RecoverDecodableTextForInspection { get; init; } #

Retains decodable text on a partially unmappable page or from leading page content streams before a supported page content filter reports damaged data during PdfDocument.ReadForInspection. The page remains incomplete. Default: false.

public PdfPageSelection? PageSelection { get; set; } #

Optional caller-ordered page selection. Null reads every page in document order.

public PdfTextLayoutOptions LayoutOptions { get; init; } #

Layout and geometry settings shared by every built-in semantic stage.

public PdfUnderstandingPipelineOptions? Pipeline { get; init; } #

Optional semantic-stage customization. Null selects the built-in stages for PdfLoadOptions.Profile. Custom stages still run inside the canonical read engine and produce the same result contract.