Class DocumentMetadata
Document level metadata
Contains information about the entire document, such as total pages and table counts.
Also includes per-page metadata.
Inheritance
Namespace: IronPdf.Extractions
Assembly: IronPdf.dll
Syntax
public class DocumentMetadata : Object
Text extraction in IronPDF is handled through DocumentMetadata. It represents document level metadata Contains information about the entire document, such as total pages and table counts.
DocumentMetadata matters when an application needs to configure or invoke text extraction from C# code. The class encapsulates the related options and behavior in a single object that is set up once and reused across render or processing calls. Typical scenarios include batch generation pipelines, templated document workflows, and integration with existing C# document services.
To use DocumentMetadata, instantiate or obtain it from the relevant entry point in the IronPDF C# API. Key properties include PageMetadata, TableCount, TotalPages. Assign options or invoke methods on the instance to configure or perform the operation. The add copy delete pages PDF covers typical usage in C# end to end.
using IronPdf;
var instance = new DocumentMetadata();
var current = instance.PageMetadata;
// Read or assign other properties such as TableCount, TotalPagesFor the broader workflow, see the metadata guide in the IronPDF C# documentation. For broader context, the text extraction portion of the IronPDF C# API contains related types that work with DocumentMetadata directly. DocumentMetadata exposes additional members beyond those highlighted above; the reference tables on this page list the full set. In application code, treat DocumentMetadata as a configured object that is constructed once and reused across operations rather than instantiated per call. Configuration is generally idempotent: assigning the same property value twice has the same effect as assigning it once. For diagnostic purposes, inspect the relevant DocumentMetadata property after each operation to confirm the configured state. See the constructors, properties, and methods tables below for the complete API surface of DocumentMetadata.
Constructors
DocumentMetadata()
Declaration
public DocumentMetadata()
Properties
PageMetadata
Dictionary containing metadata for each page
Key is the page number (1-based), value is the PageMetadata for that page.
Declaration
public Dictionary<int, PageMetadata> PageMetadata { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.Dictionary<System.Int32, PageMetadata> |
TableCount
Total number of tables found in the document
Declaration
public int TableCount { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
TotalPages
Total number of pages in the document
Declaration
public int TotalPages { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |