Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

PdfDocumentReadResult

OfficeIMO.Pdf

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

First-party logical read model for a parser-supported PDF.

Inheritance

  • object
  • PdfDocumentReadResult

Usage

Explore 11 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 8

Methods

public IReadOnlyList<PdfAttachmentInfo> GetAttachmentsByFileName(string fileName) #

Returns attachments with a matching file specification file name.

Parameters

fileName string required

Returns

IReadOnlyList<PdfAttachmentInfo>
public IReadOnlyList<PdfAttachmentInfo> GetAttachmentsByRelationship(PdfAssociatedFileRelationship relationship) #

Returns attachments with a matching associated-file relationship.

Parameters

relationship OfficeIMO.Pdf.PdfAssociatedFileRelationship required

Returns

IReadOnlyList<PdfAttachmentInfo>
public IReadOnlyList<PdfAttachmentInfo> GetAttachmentsBySource(string source) #

Returns attachments from a matching catalog source.

Parameters

source string required

Returns

IReadOnlyList<PdfAttachmentInfo>
public IReadOnlyList<PdfCatalogAction> GetCatalogActionsByActionType(string actionType) #

Returns catalog-level actions with a matching PDF action type.

Parameters

actionType string required

Returns

IReadOnlyList<PdfCatalogAction>
public IReadOnlyList<PdfCatalogAction> GetCatalogActionsBySource(string source) #

Returns catalog-level actions from a matching catalog source.

Parameters

source string required

Returns

IReadOnlyList<PdfCatalogAction>
GetElements 2 overloads
public IReadOnlyList<IPdfLogicalElement> GetElements(PdfLogicalElementKind kind) #

Returns logical elements of the requested kind in document order.

Parameters

kind OfficeIMO.Pdf.PdfLogicalElementKind required

Returns

IReadOnlyList<IPdfLogicalElement>
public IReadOnlyList<IPdfLogicalElement> GetElements(int pageNumber) #

Returns logical elements for a one-based source page number.

Parameters

pageNumber int required

Returns

IReadOnlyList<IPdfLogicalElement>
GetFormFields 2 overloads
public IReadOnlyList<PdfFormField> GetFormFields(PdfFormFieldKind kind) #

Returns simple AcroForm fields for the requested common field kind.

Parameters

kind OfficeIMO.Pdf.PdfFormFieldKind required

Returns

IReadOnlyList<PdfFormField>
public IReadOnlyList<PdfFormField> GetFormFields(int pageNumber) #

Returns simple AcroForm fields represented by widgets on a one-based page number.

Parameters

pageNumber int required

Returns

IReadOnlyList<PdfFormField>
GetFormWidgets 2 overloads
public IReadOnlyList<PdfLogicalFormWidget> GetFormWidgets(string fieldName) #

Returns logical widget annotations for a fully qualified form field name.

Parameters

fieldName string required

Returns

IReadOnlyList<PdfLogicalFormWidget>
public IReadOnlyList<PdfLogicalFormWidget> GetFormWidgets(int pageNumber) #

Returns logical widget annotations for a one-based page number.

Parameters

pageNumber int required

Returns

IReadOnlyList<PdfLogicalFormWidget>
public IReadOnlyList<PdfLogicalLinkAnnotation> GetLinksByDestinationName(string destinationName) #

Returns logical internal link annotations for a named destination.

Parameters

destinationName string required

Returns

IReadOnlyList<PdfLogicalLinkAnnotation>
public IReadOnlyList<PdfLogicalLinkAnnotation> GetLinksByDestinationPageNumber(int pageNumber) #

Returns logical internal direct-destination link annotations for a one-based destination page number.

Parameters

pageNumber int required

Returns

IReadOnlyList<PdfLogicalLinkAnnotation>
public IReadOnlyList<PdfLogicalLinkAnnotation> GetLinksByNamedAction(string namedAction) #

Returns logical named-action link annotations for a viewer action name.

Parameters

namedAction string required

Returns

IReadOnlyList<PdfLogicalLinkAnnotation>
public IReadOnlyList<PdfLogicalLinkAnnotation> GetLinksByRemoteFile(string remoteFile) #

Returns logical remote GoTo link annotations for a target file.

Parameters

remoteFile string required

Returns

IReadOnlyList<PdfLogicalLinkAnnotation>
public IReadOnlyList<PdfLogicalLinkAnnotation> GetLinksByUri(string uri) #

Returns logical URI link annotations for a URI action target.

Parameters

uri string required

Returns

IReadOnlyList<PdfLogicalLinkAnnotation>
public IReadOnlyList<PdfOptionalContentGroup> GetOptionalContentGroupsByName(string name) #

Returns optional-content groups with a matching layer display name.

Parameters

name string required

Returns

IReadOnlyList<PdfOptionalContentGroup>
public IReadOnlyList<PdfOutputIntentInfo> GetOutputIntentsByOutputConditionIdentifier(string outputConditionIdentifier) #

Returns output intents with a matching /OutputConditionIdentifier.

Parameters

outputConditionIdentifier string required

Returns

IReadOnlyList<PdfOutputIntentInfo>
public IReadOnlyList<PdfOutputIntentInfo> GetOutputIntentsBySubtype(string subtype) #

Returns output intents with a matching /S subtype.

Parameters

subtype string required

Returns

IReadOnlyList<PdfOutputIntentInfo>
GetOwningSection 7 overloads
public PdfLogicalSection? GetOwningSection(PdfLogicalTextBlock textBlock) #

Returns the section directly owning a text block, or null for unsectioned content.

Parameters

textBlock OfficeIMO.Pdf.PdfLogicalTextBlock required
public PdfLogicalSection? GetOwningSection(PdfLogicalParagraph paragraph) #

Returns the section directly owning a paragraph, or null for unsectioned content.

Parameters

paragraph OfficeIMO.Pdf.PdfLogicalParagraph required
public PdfLogicalSection? GetOwningSection(PdfLogicalListItem listItem) #

Returns the section directly owning a list item, or null for unsectioned content.

Parameters

listItem OfficeIMO.Pdf.PdfLogicalListItem required
public PdfLogicalSection? GetOwningSection(PdfLogicalTable table) #

Returns the section directly owning a table, or null for unsectioned content.

Parameters

table OfficeIMO.Pdf.PdfLogicalTable required
public PdfLogicalSection? GetOwningSection(PdfLogicalImage image) #

Returns the section directly owning a placement-local image projection. For an aggregate page image resource, returns the owner only when all placements belong to one section.

Parameters

image OfficeIMO.Pdf.PdfLogicalImage required
public PdfLogicalSection? GetOwningSection(PdfLogicalLinkAnnotation link) #

Returns the section directly owning a link, or null for unsectioned content.

Parameters

link OfficeIMO.Pdf.PdfLogicalLinkAnnotation required
public PdfLogicalSection? GetOwningSection(PdfLogicalFormWidget formWidget) #

Returns the section directly owning a form widget, or null for unsectioned content.

Parameters

formWidget OfficeIMO.Pdf.PdfLogicalFormWidget required
public IReadOnlyList<PdfLogicalSection> GetOwningSections(PdfLogicalImage image) #

Returns every section containing a placement of the supplied aggregate image resource. Placement-local images return their single direct owner.

Parameters

image OfficeIMO.Pdf.PdfLogicalImage required

Returns

IReadOnlyList<PdfLogicalSection>
public IReadOnlyList<PdfPageAction> GetPageActions(int pageNumber) #

Returns page-level additional actions for a one-based page number.

Parameters

pageNumber int required

Returns

IReadOnlyList<PdfPageAction>
public IReadOnlyList<PdfPageAction> GetPageActionsByActionPath(string actionPath) #

Returns page-level additional actions with a matching stable action path.

Parameters

actionPath string required

Returns

IReadOnlyList<PdfPageAction>
public IReadOnlyList<PdfPageAction> GetPageActionsByActionType(string actionType) #

Returns page-level additional actions with a matching PDF action type.

Parameters

actionType string required

Returns

IReadOnlyList<PdfPageAction>
public IReadOnlyList<PdfPageAction> GetPageActionsByTriggerName(string triggerName) #

Returns page-level additional actions with a matching page /AA trigger key.

Parameters

triggerName string required

Returns

IReadOnlyList<PdfPageAction>
public IReadOnlyList<PdfLogicalPage> GetPages(int pageNumber) #

Returns logical pages for a one-based source page number, preserving range-selection duplicates.

Parameters

pageNumber int required

Returns

IReadOnlyList<PdfLogicalPage>
public IReadOnlyList<PdfLogicalParagraphContinuationGroup> GetParagraphContinuationGroups(PdfLogicalParagraphContinuationOptions? options = null) #

Returns conservative cross-page paragraph continuation groups in document order.

Parameters

options OfficeIMO.Pdf.PdfLogicalParagraphContinuationOptions? = null optional
GetTableContinuationGroups 2 overloads
public IReadOnlyList<PdfLogicalTableContinuationGroup> GetTableContinuationGroups(PdfLogicalTableContinuationOptions? options = null) #

Returns bounded cross-page table continuation groups in document order.

Parameters

options OfficeIMO.Pdf.PdfLogicalTableContinuationOptions? = null optional

Returns

IReadOnlyList<PdfLogicalTableContinuationGroup>
public IReadOnlyList<PdfLogicalTableContinuationGroup> GetTableContinuationGroups(PdfLogicalTableContinuationOptions? options, CancellationToken cancellationToken) #

Returns bounded cross-page table continuation groups with cooperative cancellation.

Parameters

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

Returns

IReadOnlyList<PdfLogicalTableContinuationGroup>
public bool HasElementKind(PdfLogicalElementKind kind) #

True when at least one logical element of the requested kind is present.

Parameters

kind OfficeIMO.Pdf.PdfLogicalElementKind required

Returns

bool
public bool HasSourcePage(int pageNumber) #

True when at least one logical page for the one-based source page number is present.

Parameters

pageNumber int required

Returns

bool
public bool TryGetFormField(string name, out PdfFormField? field) #

Attempts to get a simple AcroForm field by its fully qualified field name.

Parameters

name string required
field OfficeIMO.Pdf.PdfFormField? required

Returns

bool

Properties

public IReadOnlyList<PdfAttachmentInfo> Attachments { get; } #

Embedded and associated file attachment metadata discovered from the document catalog.

public int AttachmentCount { get; } #

Number of embedded and associated file attachments discovered from the document catalog.

public bool HasAttachments { get; } #

True when at least one embedded or associated file attachment was discovered.

public IReadOnlyList<string> AttachmentNames { get; } #

Attachment name-tree keys or associated-file fallback names in first-seen order.

public IReadOnlyList<string> AttachmentFileNames { get; } #

Distinct attachment file names in first-seen order.

public IReadOnlyList<string> AttachmentSources { get; } #

Distinct catalog attachment sources in first-seen order.

public IReadOnlyList<PdfCatalogAction> CatalogActions { get; } #

Catalog-level actions discovered from supported name trees.

public bool HasCatalogActions { get; } #

True when at least one catalog-level action was read from supported name trees.

public int CatalogActionCount { get; } #

Number of catalog-level actions read from supported name trees.

public IReadOnlyList<string> CatalogActionNames { get; } #

Catalog action name-tree keys in first-seen order.

public IReadOnlyList<string> CatalogActionTypes { get; } #

Distinct catalog action types in first-seen order.

public IReadOnlyList<string> CatalogActionSources { get; } #

Distinct catalog action sources in first-seen order.

public IReadOnlyDictionary<string, IReadOnlyList<PdfCatalogAction>> CatalogActionsByActionType { get; } #

Catalog actions grouped by PDF action type.

public IReadOnlyDictionary<string, IReadOnlyList<PdfCatalogAction>> CatalogActionsBySource { get; } #

Catalog actions grouped by catalog source.

public PdfDocumentProperties Metadata { get; } #

Document metadata read from the PDF Info dictionary when available.

public PdfReadProfile Profile { get; } #

Semantic reconstruction profile used to produce this result.

public bool IncludesImages { get; } #

True when image placement analysis and image payload extraction were requested.

public bool IncludesFormWidgets { get; } #

True when secondary logical AcroForm widget objects were requested. Source field facts remain available regardless of this projection flag.

public IReadOnlyList<PdfLogicalPage> Pages { get; } #

Logical pages in document order.

public int SourcePageCount { get; } #

Total page count in the source PDF before caller page selection was applied.

public IReadOnlyDictionary<int, IReadOnlyList<PdfLogicalPage>> PagesBySourcePageNumber { get; } #

Logical pages grouped by one-based source page number. Range-based loads can contain the same source page more than once.

public IReadOnlyList<PdfOutlineItem> Outlines { get; } #

Top-level document outline/bookmark entries.

public IReadOnlyList<PdfPageLabel> PageLabels { get; } #

Page-label rules discovered from the document catalog.

public IReadOnlyList<PdfNamedDestination> NamedDestinations { get; } #

Named destinations discovered from the document catalog.

public PdfDocumentOpenAction? OpenAction { get; } #

Simple document open action discovered from the document catalog, when supported.

public PdfViewerPreferences? ViewerPreferences { get; } #

Simple viewer preference entries discovered from the document catalog, when supported.

public IReadOnlyList<PdfFormField> FormFields { get; } #

Simple AcroForm fields discovered from the document catalog.

public string? AcroFormDefaultAppearance { get; } #

AcroForm default appearance string from /DA, when present.

public bool HasAcroFormDefaultAppearance { get; } #

True when an AcroForm default appearance string was readable.

public int? AcroFormQuadding { get; } #

Raw AcroForm default /Q quadding value, when present.

public bool HasAcroFormQuadding { get; } #

True when an AcroForm default /Q quadding value was readable.

public PdfFormFieldTextAlignment AcroFormTextAlignment { get; } #

Common AcroForm default text alignment inferred from /Q quadding.

public PdfAcroFormXfaInfo? AcroFormXfa { get; } #

AcroForm XFA packet metadata when /AcroForm /XFA is present.

public bool HasAcroFormXfa { get; } #

True when the AcroForm contains an XFA packet entry.

public bool? AcroFormNeedAppearances { get; } #

AcroForm NeedAppearances flag, when present.

public bool RequiresAcroFormAppearanceRegeneration { get; } #

True when the AcroForm requests viewer-side appearance regeneration.

public bool HasAcroFormNeedAppearances { get; } #

True when an AcroForm NeedAppearances flag was readable.

public int? AcroFormSignatureFlags { get; } #

Raw AcroForm signature flags from /SigFlags, when present.

public bool HasAcroFormSignatureFlags { get; } #

True when AcroForm signature flags were readable.

public bool AcroFormSignaturesExist { get; } #

True when AcroForm /SigFlags indicates that the document contains signatures.

public bool AcroFormAppendOnly { get; } #

True when AcroForm /SigFlags indicates that the document should only be saved by appending changes.

public IReadOnlyDictionary<string, PdfFormField> FormFieldsByName { get; } #

Named simple AcroForm fields keyed by fully qualified field name.

public IReadOnlyList<string> FormFieldNames { get; } #

Fully qualified names for simple AcroForm fields that have a readable name.

public IReadOnlyDictionary<PdfFormFieldKind, IReadOnlyList<PdfFormField>> FormFieldsByKind { get; } #

Simple AcroForm fields grouped by common field kind.

public IReadOnlyDictionary<int, IReadOnlyList<PdfFormField>> FormFieldsByPageNumber { get; } #

Simple AcroForm fields grouped by one-based page number for fields that have readable widgets.

public IReadOnlyList<PdfLogicalTextBlock> TextBlocks { get; } #

All line-level text blocks flattened in page order.

public IReadOnlyList<PdfLogicalHeading> Headings { get; } #

All heuristic heading objects flattened in page order.

public string Text { get; } #

Plain text in canonical page and reading order, with lines and pages separated by platform newlines.

public IReadOnlyList<PdfLogicalSection> Sections { get; } #

Top-level heading-owned sections reconstructed in canonical reading order.

public IReadOnlyList<PdfLogicalSection> AllSections { get; } #

All reconstructed sections flattened in document reading order.

public IReadOnlyList<PdfLogicalParagraph> Paragraphs { get; } #

All heuristic paragraph objects flattened in page order.

public IReadOnlyList<PdfLogicalListItem> ListItems { get; } #

All detected list item objects flattened in page order.

public IReadOnlyList<PdfLogicalTable> Tables { get; } #

All detected table objects flattened in page order.

public IReadOnlyList<PdfTaggedTableDiagnostic> TaggedTableDiagnostics { get; } #

Tagged tables whose structure was not used to rebuild their grid, in page order; geometric detection reads those pages instead. Empty for untagged files, for files without /MarkInfo /Marked true, and when every tagged table was used.

public IReadOnlyList<PdfLogicalImage> Images { get; } #

All image XObject entries flattened in page order.

public IReadOnlyDictionary<string, IReadOnlyList<PdfLogicalLinkAnnotation>> LinksByUri { get; } #

URI link annotations grouped by URI action target.

public IReadOnlyDictionary<string, IReadOnlyList<PdfLogicalLinkAnnotation>> LinksByDestinationName { get; } #

Internal named-destination link annotations grouped by destination name.

public IReadOnlyDictionary<int, IReadOnlyList<PdfLogicalLinkAnnotation>> LinksByDestinationPageNumber { get; } #

Internal direct-destination link annotations grouped by one-based destination page number.

public IReadOnlyDictionary<string, IReadOnlyList<PdfLogicalLinkAnnotation>> LinksByNamedAction { get; } #

Named-action link annotations grouped by viewer action name.

public IReadOnlyDictionary<string, IReadOnlyList<PdfLogicalLinkAnnotation>> LinksByRemoteFile { get; } #

Remote GoTo link annotations grouped by target file.

public IReadOnlyList<PdfLogicalFormWidget> FormWidgets { get; } #

All AcroForm widget annotations flattened in page order.

public IReadOnlyDictionary<string, IReadOnlyList<PdfLogicalFormWidget>> FormWidgetsByFieldName { get; } #

AcroForm widget annotations grouped by fully qualified field name.

public IReadOnlyDictionary<int, IReadOnlyList<PdfLogicalFormWidget>> FormWidgetsByPageNumber { get; } #

AcroForm widget annotations grouped by one-based page number.

public string? CatalogPageMode { get; } #

Catalog page mode, for example UseOutlines or FullScreen, when present.

public string? CatalogPageLayout { get; } #

Catalog page layout, for example SinglePage or TwoColumnLeft, when present.

public string? CatalogVersion { get; } #

Catalog PDF version override, for example 1.7, when present.

public string? CatalogLanguage { get; } #

Catalog language tag, for example en-US or pl-PL, when present.

public int PageCount { get; } #

Number of pages in the logical document.

public bool HasOutlines { get; } #

True when at least one outline/bookmark entry was read from the catalog.

public bool HasReadablePageLabels { get; } #

True when at least one readable page-label rule was read from the catalog.

public bool HasNamedDestinations { get; } #

True when at least one named destination was read from the catalog.

public bool HasReadableOpenAction { get; } #

True when a simple document open action was read from the catalog.

public bool HasReadableViewerPreferences { get; } #

True when simple viewer preferences were read from the catalog.

public bool HasFormFields { get; } #

True when at least one simple AcroForm field was read from the document catalog.

public bool HasFormWidgets { get; } #

True when at least one AcroForm widget annotation was placed on a logical page.

public IReadOnlyList<IPdfLogicalElement> Elements { get; } #

All logical page elements flattened in page order.

public IReadOnlyDictionary<PdfLogicalElementKind, IReadOnlyList<IPdfLogicalElement>> ElementsByKind { get; } #

Logical page elements grouped by element kind.

public IReadOnlyDictionary<int, IReadOnlyList<IPdfLogicalElement>> ElementsByPageNumber { get; } #

Logical page elements grouped by one-based source page number.

public PdfOptionalContentProperties? OptionalContent { get; } #

Catalog optional-content/layer metadata discovered from /OCProperties.

public bool HasReadableOptionalContent { get; } #

True when readable optional-content/layer metadata was discovered.

public IReadOnlyList<PdfOptionalContentGroup> OptionalContentGroups { get; } #

Optional-content groups discovered from catalog /OCProperties.

public int OptionalContentGroupCount { get; } #

Number of optional-content groups discovered from catalog /OCProperties.

public bool HasOptionalContentGroups { get; } #

True when at least one optional-content group was discovered.

public IReadOnlyList<string> OptionalContentGroupNames { get; } #

Optional-content group names in first-seen catalog order.

public IReadOnlyList<PdfOutputIntentInfo> OutputIntents { get; } #

Catalog output intent metadata discovered from /OutputIntents.

public int OutputIntentCount { get; } #

Number of catalog output intents discovered from /OutputIntents.

public bool HasReadableOutputIntents { get; } #

True when at least one catalog output intent was readable.

public IReadOnlyList<string> OutputIntentSubtypes { get; } #

Distinct output intent subtypes in first-seen order.

public IReadOnlyList<string> OutputConditionIdentifiers { get; } #

Distinct output condition identifiers in first-seen order.

public IReadOnlyList<PdfPageAction> PageActions { get; } #

Page-level additional actions attached to source page dictionaries.

public bool HasPageActions { get; } #

True when at least one page-level additional action was read.

public int PageActionCount { get; } #

Number of page-level additional actions read.

public IReadOnlyList<string> PageActionTypes { get; } #

Distinct page-level action types in first-seen order.

public IReadOnlyList<string> PageActionTriggerNames { get; } #

Distinct page-level additional-action trigger keys in first-seen order.

public IReadOnlyList<string> PageActionPaths { get; } #

Distinct page-level action paths in first-seen order.

public IReadOnlyDictionary<string, IReadOnlyList<PdfPageAction>> PageActionsByActionType { get; } #

Page-level additional actions grouped by PDF action type.

public IReadOnlyDictionary<string, IReadOnlyList<PdfPageAction>> PageActionsByTriggerName { get; } #

Page-level additional actions grouped by page /AA trigger key.

public IReadOnlyDictionary<string, IReadOnlyList<PdfPageAction>> PageActionsByActionPath { get; } #

Page-level additional actions grouped by stable action path.

public IReadOnlyDictionary<int, IReadOnlyList<PdfPageAction>> PageActionsByPageNumber { get; } #

Page-level additional actions grouped by one-based page number.

public PdfDocumentSecurityInfo Security { get; } #

Security, signature, and revision markers read from the source PDF bytes.

public bool HasSecurityState { get; } #

True when the document exposes encryption, signature, permission, or incremental-update markers.

public PdfTaggedContentInfo? TaggedContent { get; } #

Tagged PDF structure metadata discovered from /MarkInfo and /StructTreeRoot.

public bool HasReadableTaggedContent { get; } #

True when readable tagged PDF structure metadata was discovered.

public IReadOnlyList<PdfFontInspectionDiagnostic> TextDecodingDiagnostics { get; } #

Warnings for undecodable native text runs omitted from this result's Text, Markdown and tables. Each diagnostic identifies the one-based source page and font at its content-stream path. Valid ActualText replacements and supported font encodings remain readable.

public PdfXmpMetadataInfo? XmpMetadata { get; } #

Catalog XMP metadata stream discovered from /Metadata.

public bool HasReadableXmpMetadata { get; } #

True when readable catalog XMP metadata was discovered.

Extension Methods

public static string ExportStructured(PdfDocumentReadResult document, PdfStructuredExportFormat format) #

Exports an already parsed logical document without rerunning extraction.

Parameters

document OfficeIMO.Pdf.PdfDocumentReadResult required
format OfficeIMO.Pdf.PdfStructuredExportFormat required

Returns

string
public static string ExtractMarkdown(PdfDocumentReadResult document, PdfLogicalMarkdownOptions? options = null) #

Renders the logical PDF document as Markdown using headings, paragraphs, lists, tables, and optional annotations from the existing logical model.

Parameters

document OfficeIMO.Pdf.PdfDocumentReadResult required
options OfficeIMO.Pdf.PdfLogicalMarkdownOptions? = null optional

Returns

string
public static IReadOnlyList<string> ToPageXmlDocuments(PdfDocumentReadResult document) #

Exports one schema-valid PAGE XML document per logical page. PAGE XML is image/page scoped and does not define a multi-page root.

Parameters

document OfficeIMO.Pdf.PdfDocumentReadResult required

Returns

IReadOnlyList<string>