API Reference
PdfReadDocument
Represents a parsed PDF document with access to pages, catalog and metadata. Note: MVP reader supports classic xref tables and simple stream parsing sufficient for OfficeIMO.Pdf output.
Inheritance
- Object
- PdfReadDocument
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method PdfReadDocument.Open
- Method PdfReadDocument.Open
- Method PdfReadDocument.Open
Accepted by parameters
- Method PdfImageExportExtensions.ExportImages
- Method PdfImageExportExtensions.ToImages
- Method PdfImageExportExtensions.ToImages
- Method PdfLogicalDocument.From
- Method PdfLogicalDocument.FromPageRanges
- Method PdfLogicalDocument.FromPageRanges
- Extension method PdfReadDocument.ExportImages
- Extension method PdfReadDocument.ExtractHeadingsByPage
- Extension method PdfReadDocument.ExtractListItemsByPage
- Extension method PdfReadDocument.ExtractParagraphsByPage
- Extension method PdfReadDocument.ExtractStructured
- Extension method PdfReadDocument.ExtractStructuredPages
- Extension method PdfReadDocument.ExtractTablesByPage
- Extension method PdfReadDocument.ExtractTextWithColumns
- Extension method PdfReadDocument.ToImages
- Extension method PdfReadDocument.ToImages
- Method PdfReadDocumentExtensions.ExtractHeadingsByPage
- Method PdfReadDocumentExtensions.ExtractListItemsByPage
- Method PdfReadDocumentExtensions.ExtractParagraphsByPage
- Method PdfReadDocumentExtensions.ExtractStructured
- Method PdfReadDocumentExtensions.ExtractStructuredPages
- Method PdfReadDocumentExtensions.ExtractTablesByPage
- Method PdfReadDocumentExtensions.ExtractTextWithColumns
- Method PdfUnderstandingPipeline.Run
- Method PdfUnderstandingPipeline.Run
Methods
public IReadOnlyList<PdfExtractedAttachment> ExtractAttachments() #IReadOnlyList<PdfExtractedAttachment>Extracts embedded file attachments from the document catalog.
public IReadOnlyList<PdfExtractedImage> ExtractImages() #IReadOnlyList<PdfExtractedImage>Extracts image XObjects from all pages in page order.
public String ExtractText() #StringExtracts fullโdocument plain text (pages separated by blank lines).
public static PdfReadDocument Open(Byte[] pdf, PdfReadOptions options = null) #PdfReadDocumentOpens a PDF from bytes into the canonical typed object model.
Parameters
- pdf System.Byte[]
- options OfficeIMO.Pdf.PdfReadOptions = null
public static PdfReadDocument Open(String path, PdfReadOptions options = null) #PdfReadDocumentOpens a PDF from a bounded file snapshot.
Parameters
- path System.String
- options OfficeIMO.Pdf.PdfReadOptions = null
public static PdfReadDocument Open(Stream stream, PdfReadOptions options = null) #PdfReadDocumentOpens a PDF from a bounded readable stream snapshot.
Parameters
- stream System.IO.Stream
- options OfficeIMO.Pdf.PdfReadOptions = null
public PdfRawDocumentView RawStructure(PdfRawStructureOptions options = null) #PdfRawDocumentViewBuilds a safe, immutable, bounded projection of the active raw object graph.
Parameters
- options OfficeIMO.Pdf.PdfRawStructureOptions = null
Inherited Methods
Properties
public IReadOnlyList<PdfAttachmentInfo> Attachments { get; } #Embedded and associated file attachment metadata discovered from the document catalog.
public IReadOnlyList<PdfReadPage> Pages { get; } #All page objects discovered in document order.
public PdfMetadata Metadata { get; } #Document metadata (when present).
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 IReadOnlyList<PdfCatalogAction> CatalogActions { get; } #Catalog-level actions discovered from supported name trees.
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 PdfPortfolioInfo Portfolio { get; } #Document portfolio metadata discovered from the catalog, when present.
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 Nullable<Int32> AcroFormQuadding { get; } #Raw AcroForm default /Q quadding value, when present.
public Nullable<Boolean> AcroFormNeedAppearances { get; } #AcroForm NeedAppearances flag, when present.
public Nullable<Int32> AcroFormSignatureFlags { get; } #Raw AcroForm signature flags from /SigFlags, when present.
public PdfAcroFormXfaInfo AcroFormXfa { get; } #AcroForm XFA packet metadata when the document catalog exposes /AcroForm /XFA.
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 PdfDocumentSecurityInfo Security { get; } #Security, signature, and revision markers read from the source PDF bytes.
public PdfRepairReport RepairReport { get; } #Structural recoveries applied while loading this document.
public PdfOptionalContentProperties OptionalContent { get; } #Catalog optional-content/layer metadata discovered from /OCProperties.
public IReadOnlyList<PdfOutputIntentInfo> OutputIntents { get; } #Catalog output intent metadata discovered from /OutputIntents.
public PdfTaggedContentInfo TaggedContent { get; } #Tagged PDF structure metadata discovered from /MarkInfo and /StructTreeRoot.
public PdfXmpMetadataInfo XmpMetadata { get; } #Catalog XMP metadata stream discovered from /Metadata.
Fields
public const Int32 MaxXmpMetadataBytes #Maximum decoded XMP metadata size parsed as XML.
4000000Extension Methods
public static IReadOnlyList<OfficeImageExportResult> ExportImages(PdfReadDocument document, OfficeImageExportFormat format, PdfImageExportOptions options = null, PdfPageSelection selection = null, CancellationToken cancellationToken = null) #IReadOnlyList<OfficeImageExportResult>Exports selected loaded PDF pages using the shared five-format result contract.
Parameters
- arg1 OfficeIMO.Pdf.PdfReadDocument
- arg2 OfficeIMO.Drawing.OfficeImageExportFormat
- arg3 OfficeIMO.Pdf.PdfImageExportOptions = null
- arg4 OfficeIMO.Pdf.PdfPageSelection = null
- arg5 System.Threading.CancellationToken = null
public static IReadOnlyList<StructuredHeadingPage> ExtractHeadingsByPage(PdfReadDocument doc, PdfTextLayoutOptions options = null) #IReadOnlyList<StructuredHeadingPage>Extracts detected headings grouped by page while preserving heading geometry.
Parameters
- doc OfficeIMO.Pdf.PdfReadDocument
- Source document.
- options OfficeIMO.Pdf.PdfTextLayoutOptions = null
- Optional layout options.
public static IReadOnlyList<StructuredListItemPage> ExtractListItemsByPage(PdfReadDocument doc, PdfTextLayoutOptions options = null) #IReadOnlyList<StructuredListItemPage>Extracts detected list items grouped by page while preserving marker and nesting hints.
Parameters
- doc OfficeIMO.Pdf.PdfReadDocument
- Source document.
- options OfficeIMO.Pdf.PdfTextLayoutOptions = null
- Optional layout options.
public static IReadOnlyList<StructuredParagraphPage> ExtractParagraphsByPage(PdfReadDocument doc, PdfTextLayoutOptions options = null) #IReadOnlyList<StructuredParagraphPage>Extracts detected paragraphs grouped by page while preserving paragraph geometry.
Parameters
- doc OfficeIMO.Pdf.PdfReadDocument
- Source document.
- options OfficeIMO.Pdf.PdfTextLayoutOptions = null
- Optional layout options.
public static ValueTuple<List<String>, List<ValueTuple<String, Int32>>, List<String>, List<String[]>> ExtractStructured(PdfReadDocument doc, PdfTextLayoutOptions options = null) #ValueTuple<List<String>, List<ValueTuple<String, Int32>>, List<String>, List<String[]>>Extracts simple structured content (lines, TOC rows, list items, leader rows) for the whole document.
Parameters
- doc OfficeIMO.Pdf.PdfReadDocument
- Source document.
- options OfficeIMO.Pdf.PdfTextLayoutOptions = null
- Optional layout options.
public static IReadOnlyList<StructuredPage> ExtractStructuredPages(PdfReadDocument doc, PdfTextLayoutOptions options = null) #IReadOnlyList<StructuredPage>Extracts structured content for each page while preserving page boundaries and detailed table geometry.
Parameters
- doc OfficeIMO.Pdf.PdfReadDocument
- Source document.
- options OfficeIMO.Pdf.PdfTextLayoutOptions = null
- Optional layout options.
public static IReadOnlyList<StructuredTablePage> ExtractTablesByPage(PdfReadDocument doc, PdfTextLayoutOptions options = null) #IReadOnlyList<StructuredTablePage>Extracts detected tables grouped by page while preserving table geometry.
Parameters
- doc OfficeIMO.Pdf.PdfReadDocument
- Source document.
- options OfficeIMO.Pdf.PdfTextLayoutOptions = null
- Optional layout options.
public static String ExtractTextWithColumns(PdfReadDocument doc, PdfTextLayoutOptions options = null) #StringExtracts text for all pages using simple two-column detection per page, separating pages with a blank line.
Parameters
- doc OfficeIMO.Pdf.PdfReadDocument
- Source document.
- options OfficeIMO.Pdf.PdfTextLayoutOptions = null
- Optional layout options controlling column detection, margins and trimming.
Returns
Concatenated plain text for all pages with inferred reading order.
public static PdfDocumentImageExportBuilder ToImages(PdfReadDocument document) #PdfDocumentImageExportBuilderStarts fluent image export for all pages in a loaded PDF document.
Parameters
- document OfficeIMO.Pdf.PdfReadDocument
public static PdfDocumentImageExportBuilder ToImages(PdfReadDocument document, PdfImageExportOptions options) #PdfDocumentImageExportBuilderStarts fluent image export using a cloned options snapshot.
Parameters
- document OfficeIMO.Pdf.PdfReadDocument
- options OfficeIMO.Pdf.PdfImageExportOptions