Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfDocument

OfficeIMO.Pdf

Namespace
OfficeIMO.Pdf
Assembly
OfficeIMO.Pdf
Source revision
5e1eb82b5acd with working tree changes
Implements
IDisposable
Modifiers
sealed

Root PDF lifecycle and capability container. Author content through PdfDocument.Create or PdfDocument.Compose; use the focused capability properties for reading and existing-document operations.

Inheritance

  • object
  • PdfDocument

Usage

Explore 107 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.

Returned or exposed by 83

Accepted by parameters 24

Examples

using OfficeIMO.Pdf;

PdfDocument.Create(pdf => pdf.Content(content => content
    .H1("OfficeIMO.Pdf")
    .Paragraph(paragraph => paragraph.Text("Hello from OfficeIMO."))))
    .Save("hello.pdf");

Methods

AddDeferredTable 2 overloads
public PdfTable AddDeferredTable(Func<IEnumerable<string[]>> rowFactory, int batchSize = 256, OfficeAlignment align = Left, PdfTableStyle? style = null) #

Adds a replayable plain-text table whose rows are enumerated and laid out in bounded batches.

Parameters

rowFactory System.Func<System.Collections.Generic.IEnumerable<string[]>> required
Factory that returns a fresh sequence of table rows for each render pass.
batchSize int = 256 optional
Maximum number of body rows materialized for one layout batch.
align OfficeIMO.OfficeAlignment = Left optional
Table alignment in the document flow.
style OfficeIMO.Pdf.PdfTableStyle? = null optional
Optional table style.

Returns

PdfTable
public PdfTable AddDeferredTable(Func<IEnumerable<PdfTableCell[]>> rowFactory, int batchSize = 256, OfficeAlignment align = Left, PdfTableStyle? style = null) #

Adds a replayable rich-cell table whose rows are enumerated and laid out in bounded batches.

Parameters

rowFactory System.Func<System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfTableCell[]>> required
Factory that returns a fresh sequence of rich table rows for each render pass.
batchSize int = 256 optional
Maximum number of body rows materialized for one layout batch.
align OfficeIMO.OfficeAlignment = Left optional
Table alignment in the document flow.
style OfficeIMO.Pdf.PdfTableStyle? = null optional
Optional table style.

Returns

PdfTable
public PdfHeading AddHeading(string text, int level = 1, OfficeAlignment align = Left, OfficeColor? color = null, string? linkUri = null, PdfHeadingStyle? style = null, string? linkContents = null, string? linkDestinationName = null) #

Appends a heading at an authored level from 1 through 9 and adds it to the outline.

Parameters

text string required
level int = 1 optional
align OfficeIMO.OfficeAlignment = Left optional
color OfficeIMO.OfficeColor? = null optional
linkUri string? = null optional
style OfficeIMO.Pdf.PdfHeadingStyle? = null optional
linkContents string? = null optional
linkDestinationName string? = null optional

Returns

PdfHeading
AddImage 2 overloads
public PdfImage AddImage(byte[] imageBytes, OfficeLength width, OfficeLength height, string? altText) #

Appends a meaningful image from supported image bytes with alternative text.

Parameters

imageBytes byte[] required
width OfficeIMO.OfficeLength required
height OfficeIMO.OfficeLength required
altText string? required

Returns

PdfImage
public PdfImage AddImage(byte[] imageBytes, OfficeLength width, OfficeLength height, OfficeAlignment? align = null, OfficeClipPath? clipPath = null, OfficeImageFit? fit = null, OfficeLength? spacingBefore = null, OfficeLength? spacingAfter = null, PdfImageStyle? style = null, string? linkUri = null, string? linkContents = null, string? altText = null) #

Appends a raster image supported by OfficeIMO.Drawing at the current flow position.

Parameters

imageBytes byte[] required
Supported image bytes.
width OfficeIMO.OfficeLength required
Image frame width.
height OfficeIMO.OfficeLength required
Image frame height.
align OfficeIMO.OfficeAlignment? = null optional
Image alignment inside the content width.
clipPath OfficeIMO.Drawing.OfficeClipPath? = null optional
Optional local clipping path applied before drawing the image.
fit OfficeIMO.Drawing.OfficeImageFit? = null optional
Image fitting mode inside the frame.
spacingBefore OfficeIMO.OfficeLength? = null optional
Top spacing, inherited from the current default image style when omitted.
spacingAfter OfficeIMO.OfficeLength? = null optional
Bottom spacing, inherited from the current default image style when omitted.
style OfficeIMO.Pdf.PdfImageStyle? = null optional
Optional reusable image placement style.
linkUri string? = null optional
Optional absolute URI or catalog-base-relative URI for an image link annotation.
linkContents string? = null optional
Optional link annotation contents metadata.
altText string? = null optional
Optional alternative text for a meaningful image.

Returns

PdfImage
AddKeyValueTable 2 overloads
public PdfTable AddKeyValueTable(IEnumerable<KeyValuePair<string, string?>> rows, OfficeAlignment align = Left, PdfTableStyle? style = null, bool includeHeader = false, string keyHeader = "Key", string valueHeader = "Value") #

Adds a two-column label/value table for document metadata, invoice facts, definition lists, and similar report sections.

Parameters

rows System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string?>> required
Plain text label/value rows.
align OfficeIMO.OfficeAlignment = Left optional
Table alignment in the document flow.
style OfficeIMO.Pdf.PdfTableStyle? = null optional
Optional table style. The style is cloned before header-row settings are applied.
includeHeader bool = false optional
When true, emits a header row before the supplied values.
keyHeader string = "Key" optional
Header text for the label column.
valueHeader string = "Value" optional
Header text for the value column.

Returns

PdfTable
public PdfTable AddKeyValueTable(IEnumerable<PdfKeyValueRow> rows, OfficeAlignment align = Left, PdfTableStyle? style = null, bool includeHeader = false, string keyHeader = "Key", string valueHeader = "Value") #

Adds a two-column rich label/value table for document metadata, invoice facts, definition lists, and similar report sections.

Parameters

rows System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfKeyValueRow> required
Rich text label/value rows.
align OfficeIMO.OfficeAlignment = Left optional
Table alignment in the document flow.
style OfficeIMO.Pdf.PdfTableStyle? = null optional
Optional table style. The style is cloned before header-row settings are applied.
includeHeader bool = false optional
When true, emits a header row before the supplied values.
keyHeader string = "Key" optional
Header text for the label column.
valueHeader string = "Value" optional
Header text for the value column.

Returns

PdfTable
AddList 2 overloads
public PdfList AddList(IEnumerable<string> items, OfficeAlignment align = Left, OfficeColor? color = null, PdfListStyle? style = null) #

Appends a bulleted list of plain items.

Parameters

items System.Collections.Generic.IEnumerable<string> required
align OfficeIMO.OfficeAlignment = Left optional
color OfficeIMO.OfficeColor? = null optional
style OfficeIMO.Pdf.PdfListStyle? = null optional

Returns

PdfList
public PdfList AddList(IEnumerable<PdfListItem> items, OfficeAlignment align = Left, OfficeColor? color = null, PdfListStyle? style = null) #

Appends a bulleted list whose items can contain rich inline text runs.

Parameters

items System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfListItem> required
align OfficeIMO.OfficeAlignment = Left optional
color OfficeIMO.OfficeColor? = null optional
style OfficeIMO.Pdf.PdfListStyle? = null optional

Returns

PdfList
AddNumberedList 2 overloads
public PdfList AddNumberedList(IEnumerable<string> items, OfficeAlignment align = Left, OfficeColor? color = null, int startNumber = 1, PdfListStyle? style = null) #

Appends a numbered list of plain items.

Parameters

items System.Collections.Generic.IEnumerable<string> required
align OfficeIMO.OfficeAlignment = Left optional
color OfficeIMO.OfficeColor? = null optional
startNumber int = 1 optional
style OfficeIMO.Pdf.PdfListStyle? = null optional

Returns

PdfList
public PdfList AddNumberedList(IEnumerable<PdfListItem> items, OfficeAlignment align = Left, OfficeColor? color = null, int startNumber = 1, PdfListStyle? style = null) #

Appends a numbered list whose items can contain rich inline text runs.

Parameters

items System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfListItem> required
align OfficeIMO.OfficeAlignment = Left optional
color OfficeIMO.OfficeColor? = null optional
startNumber int = 1 optional
style OfficeIMO.Pdf.PdfListStyle? = null optional

Returns

PdfList
AddParagraph 2 overloads
public PdfParagraph AddParagraph(string? text = null, OfficeAlignment align = Left, OfficeColor? color = null, PdfParagraphStyle? style = null) #

Appends a paragraph to the current flow and returns it.

Parameters

text string? = null optional
Optional first text run, formatted from the paragraph run defaults.
align OfficeIMO.OfficeAlignment = Left optional
Paragraph alignment.
color OfficeIMO.OfficeColor? = null optional
Optional text colour; it becomes PdfTextRunDefaults.Color and the colour of runs that carry none.
style OfficeIMO.Pdf.PdfParagraphStyle? = null optional
Optional paragraph layout style.

Returns

PdfParagraph The paragraph. It stays editable until the document is laid out, so AddParagraph().AddText("x").SetBold() renders bold text.
public PdfParagraph AddParagraph(Action<PdfParagraph> build, OfficeAlignment align = Left, OfficeColor? color = null, PdfParagraphStyle? style = null) #

Appends a paragraph built by a callback and returns it.

Parameters

build System.Action<OfficeIMO.Pdf.PdfParagraph> required
Adds and formats the paragraph runs.
align OfficeIMO.OfficeAlignment = Left optional
Paragraph alignment.
color OfficeIMO.OfficeColor? = null optional
Optional text colour; it becomes PdfTextRunDefaults.Color and the colour of runs that carry none.
style OfficeIMO.Pdf.PdfParagraphStyle? = null optional
Optional paragraph layout style.
AddTable 4 overloads
public PdfTable AddTable(IEnumerable<string[]> rows, OfficeAlignment align = Left, PdfTableStyle? style = null) #

Appends a table of plain text rows.

Parameters

rows System.Collections.Generic.IEnumerable<string[]> required
Rows of cell text, snapshotted during this call.
align OfficeIMO.OfficeAlignment = Left optional
Table alignment in the document flow.
style OfficeIMO.Pdf.PdfTableStyle? = null optional
Optional table style, including column layout, alignment, header rows and the visible caption.

Returns

PdfTable
public PdfTable AddTable(IEnumerable<PdfTableCell[]> rows, OfficeAlignment align = Left, PdfTableStyle? style = null) #

Appends a table of explicit cells, including spans, links, images, form fields and rich runs.

Parameters

rows System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfTableCell[]> required
Rows of cells, snapshotted during this call.
align OfficeIMO.OfficeAlignment = Left optional
Table alignment in the document flow.
style OfficeIMO.Pdf.PdfTableStyle? = null optional
Optional table style, including column layout, alignment, header rows and the visible caption.

Returns

PdfTable
public PdfTable AddTable(IEnumerable<string[]> rows) #

Appends a table of plain text rows with the document table style.

Parameters

rows System.Collections.Generic.IEnumerable<string[]> required

Returns

PdfTable
public PdfTable AddTable(IEnumerable<PdfTableCell[]> rows) #

Appends a table of explicit cells with the document table style.

Parameters

rows System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfTableCell[]> required

Returns

PdfTable
public PdfTable AddTable<T>(IEnumerable<T?> rows, OfficeTableOptions? options = null) #

Appends a table from typed properties, tuples, or string-keyed dictionaries using the shared bounded projection engine.

Type Parameters

T

Parameters

rows System.Collections.Generic.IEnumerable<T?> required
Source rows, enumerated once while this call snapshots the table.
options OfficeIMO.OfficeTableOptions? = null optional
Common column selection, ordering, header, formatting and alignment options.

Returns

PdfTable
Analyze 2 overloads
public PdfAnalysisReport Analyze(PdfComplianceProfile complianceProfile = None) #

Produces one consolidated health and capability report. Supply a compliance profile to include artifact readback readiness.

Parameters

complianceProfile OfficeIMO.Pdf.PdfComplianceProfile = None optional
public PdfAnalysisReport Analyze(PdfComplianceProfile complianceProfile, CancellationToken cancellationToken) #

Produces one consolidated health and capability report with cooperative cancellation.

Parameters

complianceProfile OfficeIMO.Pdf.PdfComplianceProfile required
cancellationToken System.Threading.CancellationToken required
public PdfAppendOnlyMutationReport AnalyzeAppendOnlyMutation(PdfLoadOptions? options = null) #

Analyzes which append-only mutation actions OfficeIMO.Pdf can safely attempt for this PDF.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? = null optional
AnalyzeTextEncoding 2 overloads
public IReadOnlyList<PdfTextEncodingDiagnostic> AnalyzeTextEncoding() #

Analyzes generated document text against the configured PDF text encoding before rendering.

Returns

IReadOnlyList<PdfTextEncodingDiagnostic>
public IReadOnlyList<PdfTextEncodingDiagnostic> AnalyzeTextEncoding(CancellationToken cancellationToken) #

Analyzes generated PDF text while honoring cancellation during document traversal.

Parameters

cancellationToken System.Threading.CancellationToken required
Token checked before preflight and while visiting generated content.

Returns

IReadOnlyList<PdfTextEncodingDiagnostic> Encoding diagnostics in generated document order.

Exceptions

  • OperationCanceledException – The supplied token is canceled.
AppendMetadataRevision 2 overloads
public PdfDocument AppendMetadataRevision(CancellationToken cancellationToken, string? title = null, string? author = null, string? subject = null, string? keywords = null, bool createXmpMetadata = false) #

Appends a metadata revision with cancellation through planning, serialization and output adoption.

Parameters

cancellationToken System.Threading.CancellationToken required
title string? = null optional
author string? = null optional
subject string? = null optional
keywords string? = null optional
createXmpMetadata bool = false optional
public PdfDocument AppendMetadataRevision(string? title = null, string? author = null, string? subject = null, string? keywords = null, bool createXmpMetadata = false) #

Appends a metadata-only incremental revision without rewriting the existing PDF bytes.

Parameters

title string? = null optional
author string? = null optional
subject string? = null optional
keywords string? = null optional
createXmpMetadata bool = false optional
AssessCompliance 3 overloads
public PdfComplianceReadinessReport AssessCompliance() #

Analyzes this generated document against its configured compliance profile using the same layout path as PDF output.

public PdfComplianceReadinessReport AssessCompliance(PdfComplianceProfile profile) #

Analyzes this document against a formal compliance profile. Generated documents use layout evidence; opened documents use artifact readback evidence.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile required
Compliance profile to assess without enabling formal profile generation.
public PdfComplianceReadinessReport AssessCompliance(PdfComplianceProfile profile, CancellationToken cancellationToken) #

Analyzes a compliance profile while observing cancellation during opened-PDF readback.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile required
cancellationToken System.Threading.CancellationToken required
AssessComplianceProof 2 overloads
public PdfComplianceProofReport AssessComplianceProof(IEnumerable<PdfExternalValidationResult>? externalValidations = null) #

Combines generated-document compliance readiness for the configured profile with external validator evidence.

Parameters

externalValidations System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfExternalValidationResult>? = null optional
public PdfComplianceProofReport AssessComplianceProof(PdfComplianceProfile profile, IEnumerable<PdfExternalValidationResult>? externalValidations = null) #

Combines generated-document compliance readiness for a formal profile with external validator evidence.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile required
Compliance profile to assess without enabling formal profile generation.
externalValidations System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfExternalValidationResult>? = null optional
Optional external validator results to combine with OfficeIMO.Pdf readiness evidence.
public PdfDeclaredComplianceClaimsReport AssessDeclaredComplianceClaims(IEnumerable<PdfExternalValidationResult>? externalValidations = null) #

Assesses PDF/A and PDF/UA declarations found in XMP metadata against the exact PDF bytes. Declared metadata alone is never accepted as conformance proof.

Parameters

externalValidations System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfExternalValidationResult>? = null optional
AssessMutations 2 overloads
public PdfMutationPortfolioReport AssessMutations(IEnumerable<PdfMutationOperation>? operations = null, IEnumerable<string>? fieldNames = null, PdfLoadOptions? options = null, PdfMutationExecutionPreference executionPreference = Automatic) #

Assesses several mutation families against one shared preflight snapshot.

Parameters

operations System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfMutationOperation>? = null optional
fieldNames System.Collections.Generic.IEnumerable<string>? = null optional
options OfficeIMO.Pdf.PdfLoadOptions? = null optional
executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference = Automatic optional
public PdfMutationPortfolioReport AssessMutations(CancellationToken cancellationToken, IEnumerable<PdfMutationOperation>? operations = null, IEnumerable<string>? fieldNames = null, PdfLoadOptions? options = null, PdfMutationExecutionPreference executionPreference = Automatic) #

Assesses mutation families with cooperative cancellation and one shared preflight snapshot.

Parameters

cancellationToken System.Threading.CancellationToken required
operations System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfMutationOperation>? = null optional
fieldNames System.Collections.Generic.IEnumerable<string>? = null optional
options OfficeIMO.Pdf.PdfLoadOptions? = null optional
executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference = Automatic optional
AssessRenderCompatibility 2 overloads
public PdfRenderCompatibilityReport AssessRenderCompatibility(PdfLoadOptions? options = null) #

Assesses managed page-render fidelity without rasterizing or writing image artifacts.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? = null optional
public PdfRenderCompatibilityReport AssessRenderCompatibility(PdfLoadOptions? options, PdfPageRenderOptions? renderOptions) #

Assesses managed page-render fidelity with configurable per-page diagnostic limits.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? required
renderOptions OfficeIMO.Pdf.PdfPageRenderOptions? required
public PdfDocument Compose(Action<PdfDocumentBuilder> compose) #

Higher-level composition model (page size/margins/footer + content), similar to other document DSLs. Sugar only; composes into the same PdfDocument blocks and options.

Parameters

compose System.Action<OfficeIMO.Pdf.PdfDocumentBuilder> required
public PdfAConversionResult ConvertToPdfA(PdfAConversionOptions? options = null, CancellationToken cancellationToken = default) #

Converts this PDF to PDF/A. Conversion fixes what it can without moving anything on the page and reports every change. When something cannot be made compliant without changing the content, nothing is produced and the result lists every violation by object.

Parameters

options OfficeIMO.Pdf.PdfAConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
Create 3 overloads
public static PdfDocument Create(string filePath, PdfCreateOptions? options = null) #

Creates an empty PDF associated with a path. The file is written on Save.

Parameters

filePath string required
options OfficeIMO.Pdf.PdfCreateOptions? = null optional
public static PdfDocument Create(PdfCreateOptions? options = null) #

Creates a new, empty PDF document with optional options.

Parameters

options OfficeIMO.Pdf.PdfCreateOptions? = null optional
Page size, margins and default font options. When null, sensible defaults are used.

Returns

PdfDocument New PdfDocument instance.
public static PdfDocument Create(Action<PdfDocumentBuilder> compose, PdfCreateOptions? options = null) #

Creates and composes a PDF document through the canonical authoring DSL.

Parameters

compose System.Action<OfficeIMO.Pdf.PdfDocumentBuilder> required
Document composition callback.
options OfficeIMO.Pdf.PdfCreateOptions? = null optional
Optional document-wide rendering, catalog, security, and compliance options.

Returns

PdfDocument The composed PdfDocument.
CreateComplianceArtifact 2 overloads
public PdfComplianceArtifact CreateComplianceArtifact() #

Atomically renders or snapshots this document with readiness evidence for its configured compliance profile.

public PdfComplianceArtifact CreateComplianceArtifact(PdfComplianceProfile profile) #

Atomically renders or snapshots this document with readiness evidence for profile. Use the returned artifact's bytes for external validation, then call its PdfComplianceArtifact.AssessProof method with those validator results.

Parameters

profile OfficeIMO.Pdf.PdfComplianceProfile required
public PdfDebuggerReport Debug(PdfDebuggerOptions? options = null, PdfLoadOptions? readOptions = null) #

Creates a bounded debugger projection of objects, revisions, pages, resources, and content operators.

Parameters

options OfficeIMO.Pdf.PdfDebuggerOptions? = null optional
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
public PdfDiagnosticReport Diagnostics(PdfLoadOptions? options = null) #

Builds a combined PDF diagnostic report for this document.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? = null optional
public void Dispose() #

Completes this in-memory document's lifetime. Caller-owned streams remain open.

public Task DisposeAsync() #

Completes this in-memory document's lifetime asynchronously.

Returns

Task
public IReadOnlyList<PdfExtractedAttachment> ExtractAttachments() #

Extracts the document's embedded attachment payloads.

Returns

IReadOnlyList<PdfExtractedAttachment>
public IReadOnlyList<PdfStructuredHeadingPage> ExtractHeadingsByPage(PdfTextLayoutOptions? options = null) #

Extracts detected headings grouped by page.

Parameters

options OfficeIMO.Pdf.PdfTextLayoutOptions? = null optional

Returns

IReadOnlyList<PdfStructuredHeadingPage>
public IReadOnlyList<PdfExtractedImage> ExtractImages() #

Extracts image XObjects from all pages in document order.

Returns

IReadOnlyList<PdfExtractedImage>
public IReadOnlyList<PdfStructuredListItemPage> ExtractListItemsByPage(PdfTextLayoutOptions? options = null) #

Extracts list items grouped by page.

Parameters

options OfficeIMO.Pdf.PdfTextLayoutOptions? = null optional

Returns

IReadOnlyList<PdfStructuredListItemPage>
public string ExtractMarkdown(PdfLogicalMarkdownOptions? options = null, CancellationToken cancellationToken = default) #

Extracts Markdown text from the bounded logical reading model.

Parameters

options OfficeIMO.Pdf.PdfLogicalMarkdownOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

string
public IReadOnlyList<PdfStructuredParagraphPage> ExtractParagraphsByPage(PdfTextLayoutOptions? options = null) #

Extracts paragraphs grouped by page.

Parameters

options OfficeIMO.Pdf.PdfTextLayoutOptions? = null optional

Returns

IReadOnlyList<PdfStructuredParagraphPage>
public IReadOnlyList<PdfStructuredPage> ExtractStructuredPages(PdfTextLayoutOptions? options = null) #

Extracts structured pages with paragraphs, lists, headings and tables.

Parameters

options OfficeIMO.Pdf.PdfTextLayoutOptions? = null optional

Returns

IReadOnlyList<PdfStructuredPage>
public IReadOnlyList<PdfStructuredTablePage> ExtractTablesByPage(PdfTextLayoutOptions? options = null) #

Extracts detected tables grouped by page.

Parameters

options OfficeIMO.Pdf.PdfTextLayoutOptions? = null optional

Returns

IReadOnlyList<PdfStructuredTablePage>
public string ExtractText(CancellationToken cancellationToken = default) #

Extracts page text through the document's bounded read pipeline.

Parameters

cancellationToken System.Threading.CancellationToken = default optional

Returns

string
public string ExtractTextWithColumns(PdfTextLayoutOptions? options = null) #

Extracts text with column-aware reading order.

Parameters

options OfficeIMO.Pdf.PdfTextLayoutOptions? = null optional

Returns

string
public PdfInteractiveContentFlattenResult FlattenInteractiveContent(PdfInteractiveContentFlattenOptions? options = null) #

Flattens readable AcroForm fields and supported visual annotations into one new PDF artifact.

Parameters

options OfficeIMO.Pdf.PdfInteractiveContentFlattenOptions? = null optional
FlattenVisualAnnotations 2 overloads
public PdfDocument FlattenVisualAnnotations() #

Creates a new PDF with visual annotation appearance streams painted into page content where supported.

public PdfDocument FlattenVisualAnnotations(CancellationToken cancellationToken) #

Flattens supported annotation appearances with cooperative cancellation.

Parameters

cancellationToken System.Threading.CancellationToken required
public PdfPageInteractionMap GetEditingInteractions(int pageNumber) #

Reads visual hit regions for permitted annotation and form editing, without extracting page text or images.

Parameters

pageNumber int required
GetPageLayouts 2 overloads
public IReadOnlyList<PdfPageLayoutInfo> GetPageLayouts(PdfLoadOptions? options = null) #

Reads page geometry without extracting document content or requiring copy permission.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? = null optional

Returns

IReadOnlyList<PdfPageLayoutInfo>
public IReadOnlyList<PdfPageLayoutInfo> GetPageLayouts(PdfLoadOptions? options, CancellationToken cancellationToken) #

Reads page geometry with cooperative cancellation, without extracting document content or requiring copy permission.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? required
cancellationToken System.Threading.CancellationToken required

Returns

IReadOnlyList<PdfPageLayoutInfo>
GetPrintablePageLayouts 2 overloads
public IReadOnlyList<PdfPageLayoutInfo> GetPrintablePageLayouts(PdfLoadOptions? options = null) #

Reads page geometry for printing after enforcing the authenticated document permissions.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? = null optional

Returns

IReadOnlyList<PdfPageLayoutInfo>
public IReadOnlyList<PdfPageLayoutInfo> GetPrintablePageLayouts(PdfLoadOptions? options, CancellationToken cancellationToken) #

Reads page geometry for printing with cooperative cancellation after enforcing the authenticated document permissions.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? required
cancellationToken System.Threading.CancellationToken required

Returns

IReadOnlyList<PdfPageLayoutInfo>
Inspect 2 overloads
public PdfDocumentInfo Inspect(PdfLoadOptions? options = null) #

Inspects metadata, pages, annotations, fields, and catalog-level state.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? = null optional
public PdfDocumentInfo Inspect(PdfLoadOptions? options, CancellationToken cancellationToken) #

Inspects metadata, pages, annotations, fields, and catalog-level state with cooperative cancellation.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? required
cancellationToken System.Threading.CancellationToken required
public PdfDocumentViewInfo InspectForViewing(PdfLoadOptions? options = null, CancellationToken cancellationToken = default) #

Inspects authenticated page geometry for viewing without requiring content-copy permission. Full logical inspection is included only when extraction is authorized. This does not change mutation or extraction policy.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfDocumentViewInfo InspectGeometryForViewing(PdfLoadOptions? options = null, CancellationToken cancellationToken = default) #

Inspects authenticated page geometry and permissions without decoding logical page content, even when extraction is permitted.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfSanitizationReport InspectSanitization(PdfSanitizationOptions? options = null, CancellationToken cancellationToken = default) #

Inspects what the supplied sanitization policy would remove without modifying the PDF.

Parameters

options OfficeIMO.Pdf.PdfSanitizationOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
Load 4 overloads
public static PdfDocument Load(string path, PdfLoadOptions? loadOptions = null) #

Loads an existing PDF from a bounded file snapshot.

Parameters

path string required
loadOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
public static PdfDocument Load(Stream stream, PdfLoadOptions? loadOptions = null) #

Loads a complete PDF from a readable stream. Seekable streams are read from the beginning and restored.

Parameters

stream System.IO.Stream required
loadOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
public static PdfDocument Load(string path, PdfLoadOptions? loadOptions, CancellationToken cancellationToken) #

Loads a bounded file snapshot with cooperative cancellation.

Parameters

path string required
loadOptions OfficeIMO.Pdf.PdfLoadOptions? required
cancellationToken System.Threading.CancellationToken required
public static PdfDocument Load(Stream stream, PdfLoadOptions? loadOptions, CancellationToken cancellationToken) #

Loads a bounded stream snapshot with cooperative cancellation and preserves seekable stream position.

Parameters

stream System.IO.Stream required
loadOptions OfficeIMO.Pdf.PdfLoadOptions? required
cancellationToken System.Threading.CancellationToken required
LoadAsync 2 overloads
public static async Task<PdfDocument> LoadAsync(string path, PdfLoadOptions? loadOptions = null, CancellationToken cancellationToken = default) #

Asynchronously loads an existing PDF from a bounded file snapshot.

Parameters

path string required
loadOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<PdfDocument>
public static async Task<PdfDocument> LoadAsync(Stream stream, PdfLoadOptions? loadOptions = null, CancellationToken cancellationToken = default) #

Asynchronously loads a complete PDF from a readable caller-owned stream.

Parameters

stream System.IO.Stream required
loadOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<PdfDocument>
Merge 2 overloads
public static PdfDocument Merge(IEnumerable<PdfDocument> documents, PdfMergeOptions? options = null, CancellationToken cancellationToken = default) #

Merges documents in order using one structure policy.

Parameters

documents System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfDocument> required
options OfficeIMO.Pdf.PdfMergeOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public static PdfDocument Merge(IEnumerable<PdfDocument> documents, PdfMergeOptions? options, out PdfMergeReport report, CancellationToken cancellationToken = default) #

Merges documents and returns the completed policy and readback report.

Parameters

documents System.Collections.Generic.IEnumerable<OfficeIMO.Pdf.PdfDocument> required
options OfficeIMO.Pdf.PdfMergeOptions? required
report OfficeIMO.Pdf.PdfMergeReport required
cancellationToken System.Threading.CancellationToken = default optional
MergeWith 6 overloads
public PdfDocument MergeWith(PdfDocument document, PdfMergeOptions options) #

Merges this PDF with another loaded or generated PDF using an explicit structure policy.

Parameters

document OfficeIMO.Pdf.PdfDocument required
options OfficeIMO.Pdf.PdfMergeOptions required
public PdfDocument MergeWith(PdfDocument document, PdfMergeOptions options, CancellationToken cancellationToken) #

Merges this PDF with another document using an explicit structure policy and cooperative cancellation.

Parameters

document OfficeIMO.Pdf.PdfDocument required
options OfficeIMO.Pdf.PdfMergeOptions required
cancellationToken System.Threading.CancellationToken required
public PdfDocument MergeWith(PdfDocument document) #

Creates a new PDF by merging this PDF with another loaded or generated PDF.

Parameters

document OfficeIMO.Pdf.PdfDocument required
public PdfDocument MergeWith(byte[] pdf) #

Creates a new PDF by merging this PDF with another PDF byte payload. The input is consumed synchronously and is not retained by the returned document.

Parameters

pdf byte[] required
public PdfDocument MergeWith(string path) #

Creates a new PDF by merging this PDF with another PDF file.

Parameters

path string required
public PdfDocument MergeWith(Stream stream) #

Creates a new PDF by merging this PDF with another readable PDF stream.

Parameters

stream System.IO.Stream required
public PdfDocument Meta(string? title = null, string? author = null, string? subject = null, string? keywords = null) #

Sets PDF metadata. Only values provided are updated; missing parameters keep previous values. Pass an empty string to clear a previously assigned value.

Parameters

title string? = null optional
Document title metadata.
author string? = null optional
Document author metadata.
subject string? = null optional
Document subject metadata.
keywords string? = null optional
Document keywords metadata.

Returns

PdfDocument This PdfDocument for chaining.
PlanMutation 2 overloads
public PdfMutationPlan PlanMutation(PdfMutationOperation operation, IEnumerable<string>? fieldNames = null, PdfLoadOptions? options = null, PdfMutationExecutionPreference executionPreference = Automatic) #

Chooses a full-rewrite, append-only, or blocked path for an existing-document mutation.

Parameters

operation OfficeIMO.Pdf.PdfMutationOperation required
fieldNames System.Collections.Generic.IEnumerable<string>? = null optional
options OfficeIMO.Pdf.PdfLoadOptions? = null optional
executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference = Automatic optional
public PdfMutationPlan PlanMutation(PdfMutationOperation operation, IEnumerable<string>? fieldNames, PdfLoadOptions? options, PdfMutationExecutionPreference executionPreference, CancellationToken cancellationToken) #

Chooses a mutation path while observing cancellation during parsing and preflight.

Parameters

operation OfficeIMO.Pdf.PdfMutationOperation required
fieldNames System.Collections.Generic.IEnumerable<string>? required
options OfficeIMO.Pdf.PdfLoadOptions? required
executionPreference OfficeIMO.Pdf.PdfMutationExecutionPreference required
cancellationToken System.Threading.CancellationToken required
public PdfRawDocumentView RawStructure(PdfRawStructureOptions? options = null, PdfLoadOptions? readOptions = null) #

Builds an immutable, bounded view of the document's active raw object graph.

Parameters

options OfficeIMO.Pdf.PdfRawStructureOptions? = null optional
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional
public PdfDocumentReadResult Read(PdfLoadOptions? options = null, CancellationToken cancellationToken = default) #

Builds the canonical semantic document result using the structured profile by default.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfInspectionReadResult ReadForInspection(PdfLoadOptions? options = null, CancellationToken cancellationToken = default) #

Reads selected pages while retaining structural facts and explicit outcomes for unmappable text, unsupported content-stream filters, and opt-in recovery from damaged page streams. PdfDocument.Read remains fail-fast. Pass PdfLoadOptions.RecoverDecodableTextForInspection to retain readable text on a page with a font-mapping failure when using the built-in glyph decoder, or from leading page content streams before a supported page content filter reports damaged data. Cancellation, resource admission, authentication, permissions, structural parsing, and unexpected stage failures remain terminal and are never converted to partial success.

Parameters

options OfficeIMO.Pdf.PdfLoadOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
RemoveSelectedContent 2 overloads
public static OfficeContentCleanupResult RemoveSelectedContent(byte[] pdf, OfficeContentCleanupSelection selection, OfficeContentCleanupOptions? options = null, PdfLoadOptions? readOptions = null) #

Physically removes exact selected PDF text spans and verifies the rewritten artifact.

Parameters

pdf byte[] required
selection OfficeIMO.ContentSafety.OfficeContentCleanupSelection required
options OfficeIMO.ContentSafety.OfficeContentCleanupOptions? = null optional
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional

Returns

OfficeContentCleanupResult
public static OfficeContentCleanupResult RemoveSelectedContent(string inputPath, string outputPath, OfficeContentCleanupSelection selection, OfficeContentCleanupOptions? options = null, PdfLoadOptions? readOptions = null) #

Atomically writes an explicitly cleaned PDF artifact.

Parameters

inputPath string required
outputPath string required
selection OfficeIMO.ContentSafety.OfficeContentCleanupSelection required
options OfficeIMO.ContentSafety.OfficeContentCleanupOptions? = null optional
readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional

Returns

OfficeContentCleanupResult
ReplaceProperties 2 overloads
public PdfDocument ReplaceProperties(PdfDocumentProperties metadata, CancellationToken cancellationToken) #

Replaces metadata with cooperative cancellation through parsing, rewriting and output adoption.

Parameters

metadata OfficeIMO.Pdf.PdfDocumentProperties required
cancellationToken System.Threading.CancellationToken required
public PdfDocument ReplaceProperties(PdfDocumentProperties metadata) #

Creates a new PDF with exactly the supplied metadata.

Parameters

metadata OfficeIMO.Pdf.PdfDocumentProperties required
public PdfSanitizationResult Sanitize(PdfSanitizationOptions? options = null, CancellationToken cancellationToken = default) #

Removes or quarantines active content and embedded payloads through a proven full rewrite.

Parameters

options OfficeIMO.Pdf.PdfSanitizationOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
Save 4 overloads
public void Save() #

Saves to the associated path, rejecting serialization loss by default.

public void Save(PdfSaveOptions options) #

Saves to the associated path using explicit native-output options.

Parameters

options OfficeIMO.Pdf.PdfSaveOptions required
public void Save(string path, PdfSaveOptions? options = null, CancellationToken cancellationToken = default) #

Atomically saves the native document to a file and associates that path.

Parameters

path string required
options OfficeIMO.Pdf.PdfSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public void Save(Stream stream, PdfSaveOptions? options = null, CancellationToken cancellationToken = default) #

Writes native PDF to a caller-owned stream after validating fidelity.

Parameters

stream System.IO.Stream required
options OfficeIMO.Pdf.PdfSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
public PdfAConversionReport SaveAsPdfA(string path, PdfAConversionOptions? options = null, CancellationToken cancellationToken = default) #

Converts this PDF to PDF/A and writes it to path. Throws PdfAConversionException listing every violation, without creating the file, when the source cannot be converted without changing its content.

Parameters

path string required
options OfficeIMO.Pdf.PdfAConversionOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional
SaveAsync 3 overloads
public Task SaveAsync(CancellationToken cancellationToken = default) #

Asynchronously saves the native document to its associated path.

Parameters

cancellationToken System.Threading.CancellationToken = default optional

Returns

Task
public async Task SaveAsync(string path, PdfSaveOptions? options = null, CancellationToken cancellationToken = default) #

Asynchronously saves the native document to a file and associates that path.

Parameters

path string required
options OfficeIMO.Pdf.PdfSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task
public async Task SaveAsync(Stream stream, PdfSaveOptions? options = null, CancellationToken cancellationToken = default) #

Asynchronously writes native PDF to a caller-owned stream after validating fidelity.

Parameters

stream System.IO.Stream required
options OfficeIMO.Pdf.PdfSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task
SynchronizeMetadata 2 overloads
public PdfDocument SynchronizeMetadata(CancellationToken cancellationToken, string? title = null, string? author = null, string? subject = null, string? keywords = null, bool createXmpMetadata = true) #

Synchronizes Info and XMP with cooperative cancellation, retaining the source document unchanged.

Parameters

cancellationToken System.Threading.CancellationToken required
title string? = null optional
author string? = null optional
subject string? = null optional
keywords string? = null optional
createXmpMetadata bool = true optional
public PdfDocument SynchronizeMetadata(string? title = null, string? author = null, string? subject = null, string? keywords = null, bool createXmpMetadata = true) #

Creates a normalized full-rewrite PDF whose Info dictionary and XMP packet share the supplied common fields. Null values preserve existing values and empty strings clear them.

Parameters

title string? = null optional
author string? = null optional
subject string? = null optional
keywords string? = null optional
createXmpMetadata bool = true optional
public byte[] ToBytes(PdfSaveOptions? options = null, CancellationToken cancellationToken = default) #

Serializes PDF bytes and checks any new native-output fidelity findings.

Parameters

options OfficeIMO.Pdf.PdfSaveOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

byte[]
public static bool TryPrepareImageBytes(byte[] data, out byte[] preparedBytes, out OfficeImageInfo? imageInfo, out bool wasTranscoded, out string? unsupportedReason) #

Prepares source image bytes for first-party PDF embedding. Writer-safe JPEG and PNG data is retained; supported SVG and other raster formats supported by OfficeRasterImageDecoder are normalized to PNG.

Parameters

data byte[] required
preparedBytes byte[] required
imageInfo OfficeIMO.Drawing.OfficeImageInfo? required
wasTranscoded bool required
unsupportedReason string? required

Returns

bool
public static bool TryValidateImageBytes(byte[] data, out OfficeImageInfo? imageInfo, out string? unsupportedReason) #

Checks whether image bytes can be embedded by the first-party PDF writer.

Parameters

data byte[] required
imageInfo OfficeIMO.Drawing.OfficeImageInfo? required
unsupportedReason string? required

Returns

bool
UpdateProperties 2 overloads
public PdfDocument UpdateProperties(CancellationToken cancellationToken, string? title = null, string? author = null, string? subject = null, string? keywords = null) #

Updates metadata with cooperative cancellation, preserving the source document and its captured read limits.

Parameters

cancellationToken System.Threading.CancellationToken required
title string? = null optional
author string? = null optional
subject string? = null optional
keywords string? = null optional
public PdfDocument UpdateProperties(string? title = null, string? author = null, string? subject = null, string? keywords = null) #

Creates a new PDF with updated metadata. Null values preserve existing fields; empty strings clear fields.

Parameters

title string? = null optional
author string? = null optional
subject string? = null optional
keywords string? = null optional

Properties

public string? FilePath { get; } #

Gets the associated path, or null for a document created or loaded in memory.

public PdfContentBuilder Content { get; } #

Gets the content builder for ordinary incremental authoring. It uses the same document flow as PdfDocument.Compose and cannot add generated content to a loaded PDF.

public PdfDocumentPages Pages { get; } #

Page editing and extraction operations for this PDF.

public PdfDocumentRenderer Render { get; } #

Managed page rendering, drawing projection, and renderer diagnostics.

public PdfDocumentResources Resources { get; } #

Bounded font and raw object-resource inspection.

public PdfDocumentTextEditor Text { get; } #

Existing-page text search and editing operations.

public PdfDocumentImageEditor Images { get; } #

Existing-page image placement discovery and editing operations.

public PdfDocumentAttachments Attachments { get; } #

Existing-document embedded and associated file editing operations.

public PdfDocumentBookmarks Bookmarks { get; } #

Existing-document bookmark editing operations.

public PdfDocumentAnnotations Annotations { get; } #

Existing-document annotation editing operations.

public PdfDocumentJavaScript JavaScript { get; } #

Explicit active-content operations for named document-level JavaScript.

public PdfDocumentSecurity Security { get; } #

Password encryption and digital-signature operations for this PDF.

public PdfDocumentRedactions Redactions { get; } #

Search, planning, application, and verification operations for permanent redaction.

public PdfDocumentOptimization Optimization { get; } #

Lossless optimization analysis and rewrite operations for this PDF.

public PdfDocumentProof Proof { get; } #

Visual and structural preservation proof operations for this PDF.

public PdfPipelineReport Pipeline { get; } #

Immutable create/open and mutation history accumulated by this document. Save and byte-generation results append their own exact output stage.

public PdfDocumentStamper Stamp { get; } #

Text and image stamping operations for this PDF.

public PdfDocumentForms Forms { get; } #

Simple AcroForm operations for this PDF.

public PdfDocumentProperties Properties { get; } #

Gets the standard document properties from the Info dictionary through the bounded read pipeline.

public IReadOnlyList<PdfOutlineItem> Outlines { get; } #

Gets document outlines without exposing the parser.

public IReadOnlyList<PdfNamedDestination> NamedDestinations { get; } #

Gets named destinations from the document.

public IReadOnlyList<PdfFormField> FormFields { get; } #

Gets the document's form fields.

public PdfRepairReport RepairReport { get; } #

Gets structural recovery observations from the bounded parser.

public PdfTaggedContentInfo? TaggedContent { get; } #

Gets the parsed document's tagged content.

public bool HasTaggedContent { get; } #

Gets the parsed document's has tagged content.

public IReadOnlyList<PdfCatalogAction> CatalogActions { get; } #

Gets the parsed document's catalog actions.

public IReadOnlyList<PdfJavaScript> JavaScripts { get; } #

Gets the parsed document's java scripts.

public PdfPortfolioInfo? Portfolio { get; } #

Gets the parsed document's portfolio.

public string? AcroFormDefaultAppearance { get; } #

Gets the parsed document's acro form default appearance.

public int? AcroFormQuadding { get; } #

Gets the parsed document's acro form quadding.

public bool? AcroFormNeedAppearances { get; } #

Gets the parsed document's acro form need appearances.

public int? AcroFormSignatureFlags { get; } #

Gets the parsed document's acro form signature flags.

public PdfAcroFormXfaInfo? AcroFormXfa { get; } #

Gets the parsed document's acro form xfa.

public string? CatalogVersion { get; } #

Gets the parsed document's catalog version.

public string? CatalogLanguage { get; } #

Gets the parsed document's catalog language.

public IReadOnlyList<PdfOutputIntentInfo> OutputIntents { get; } #

Gets the parsed document's output intents.

public bool OutputIntentsAreComplete { get; } #

Gets the parsed document's output intents are complete.

public PdfOptionalContentProperties? OptionalContent { get; } #

Gets the parsed document's optional content.

public PdfXmpMetadataInfo? XmpMetadata { get; } #

Gets the parsed document's xmp metadata.

Extension Methods

public static OfficeConversionReport SaveAsImages(PdfDocument document, string folderPath, PdfImageExportOptions? options = null, CancellationToken cancellationToken = default) #

Saves selected pages without retaining their encoded payloads and returns the fidelity report.

Parameters

document OfficeIMO.Pdf.PdfDocument required
folderPath string required
options OfficeIMO.Pdf.PdfImageExportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

OfficeConversionReport
public static async Task<OfficeConversionReport> SaveAsImagesAsync(PdfDocument document, string folderPath, PdfImageExportOptions? options = null, CancellationToken cancellationToken = default) #

Asynchronously saves selected pages without retaining their encoded payloads.

Parameters

document OfficeIMO.Pdf.PdfDocument required
folderPath string required
options OfficeIMO.Pdf.PdfImageExportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeConversionReport>
ToImages 2 overloads
public static IReadOnlyList<OfficeImageExportResult> ToImages(PdfDocument document, PdfImageExportOptions? options = null, CancellationToken cancellationToken = default) #

Renders the selected PDF pages using the encoding and resource limits in the options.

Parameters

document OfficeIMO.Pdf.PdfDocument required
options OfficeIMO.Pdf.PdfImageExportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<OfficeImageExportResult>
public static IReadOnlyList<OfficeImageExportResult> ToImages(PdfDocument document, PdfImageExportOptions? options, out OfficeConversionReport report, CancellationToken cancellationToken = default) #

Renders the selected pages and returns an immutable aggregate fidelity report.

Parameters

document OfficeIMO.Pdf.PdfDocument required
options OfficeIMO.Pdf.PdfImageExportOptions? required
report OfficeIMO.OfficeConversionReport required
cancellationToken System.Threading.CancellationToken = default optional

Returns

IReadOnlyList<OfficeImageExportResult>
public static async Task<OfficeConversionResult<IReadOnlyList<OfficeImageExportResult>>> ToImagesAsync(PdfDocument document, PdfImageExportOptions? options = null, CancellationToken cancellationToken = default) #

Asynchronously renders selected pages with a cloned options snapshot and fidelity report.

Parameters

document OfficeIMO.Pdf.PdfDocument required
options OfficeIMO.Pdf.PdfImageExportOptions? = null optional
cancellationToken System.Threading.CancellationToken = default optional

Returns

Task<OfficeConversionResult<IReadOnlyList<OfficeImageExportResult>>>