Search Results for

    Show / Hide Table of Contents

    Class PdfExtractionResult

    Represents the output of a PDF extraction operation, containing all extracted

    tables and text content, along with document metadata.

    Provides convenient methods to access specific portions of the extracted content.

    ------------------------------------------------

    Usage:

    var result = PdfExtractor.Extract("document.pdf");
    

    // Access all tables foreach (var table in result.Tables) { Console.WriteLine($"Table on page {table.PageNumber} with {table.RowCount} rows"); }

    // Get tables from a specific page var pageTables = result.GetTablesByPage(5);

    // Get text from a specific page var pageText = result.GetRawTextByPage(5);

    // Get full text including tables var fullText = result.FullText;

    ------------------------------------------------

    Inheritance
    System.Object
    PdfExtractionResult
    Namespace: IronPdf.Extractions
    Assembly: IronPdf.dll
    Syntax
    public class PdfExtractionResult : Object

    The record a developer receives after calling PdfExtractor.Extract is a PdfExtractionResult, the single object that bundles every table, every text layer, and the document metadata produced by one extraction pass. Rather than making separate calls for tables and text, you query this result object to slice the output by page, page range, or the whole document.

    PdfExtractionResult organises its surface into two functional areas: structured table data and text content.

    **Tables:** Tables returns the full List<TableObject> found across the document. When you need only one page, GetTablesByPage(int pageNumber) narrows the list. For a contiguous span of pages, GetTablesByPageRange(int startPage, int endPage) covers the range. To pinpoint a single table when a page holds more than one, GetTableByPageAndIndex(int pageNumber, int tableIndexOnPage) selects by zero-based position on that page.

    **Text:** FullText exposes the complete formatted text string for the document. Text gives a TextContent object for richer programmatic access. The Get-prefixed text methods mirror the table methods: GetFullTextByPage and GetFullTextByPageRange return formatted text; GetRawText, GetRawTextByPage, and GetRawTextByPageRange return unformatted strings stripped of layout hints, which is useful when feeding content to a parser or search index.

    Metadata surfaces a DocumentMetadata record containing author, title, creation date, and related document-level properties.

    A common workflow reads all tables from a report, then pulls the raw text from the same pages to feed a downstream pipeline:

    using IronPdf.Extractions;
    
    PdfExtractionResult result = PdfExtractor.Extract("annual-report.pdf");
    
    // Inspect document metadata
    Console.WriteLine(result.Metadata.Title);
    
    // Iterate every table in the document
    foreach (TableObject table in result.Tables)
        Console.WriteLine($"Page {table.PageNumber}: {table.RowCount} rows");
    
    // Pull raw text from pages 3 through 7 for indexing
    string rawSlice = result.GetRawTextByPageRange(3, 7);

    For a broader look at PDF content extraction in IronPDF, see the PDF extraction how-to, the text extraction examples, and the table extraction tutorial. The IronPDF documentation hub covers installation and licensing.

    Properties

    FullText

    Gets the full text of the document, including tables

    Combines both the extracted text and the content of all tables in reading order.

    Declaration
    public string FullText { get; }
    Property Value
    Type Description
    System.String

    Metadata

    Document-level metadata

    Contains information about the document, such as total pages and table counts.

    Declaration
    public DocumentMetadata Metadata { get; }
    Property Value
    Type Description
    DocumentMetadata

    Tables

    List of all extracted tables

    Contains all tables detected and extracted from the PDF document.

    Declaration
    public List<TableObject> Tables { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<TableObject>

    Text

    Extracted text content (outside of tables)

    Contains text extracted from the PDF document, excluding text within tables.

    Declaration
    public TextContent Text { get; }
    Property Value
    Type Description
    TextContent

    Methods

    GetFullTextByPage(Int32)

    Gets full text (with tables) for a specific page

    Combines both the extracted text and the content of all tables from the specified page in reading order.

    Declaration
    public string GetFullTextByPage(int pageNumber)
    Parameters
    Type Name Description
    System.Int32 pageNumber

    Page number (1-based)

    Returns
    Type Description
    System.String

    Full text content from the specified page, including tables

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Thrown when pageNumber is less than 1 or greater than the total number of pages.

    GetFullTextByPageRange(Int32, Int32)

    Gets full text (with tables) for a page range

    Combines both the extracted text and the content of all tables from the specified page range in reading order.

    Declaration
    public string GetFullTextByPageRange(int startPage, int endPage)
    Parameters
    Type Name Description
    System.Int32 startPage

    Starting page number (1-based, inclusive)

    System.Int32 endPage

    Ending page number (1-based, inclusive)

    Returns
    Type Description
    System.String

    Full text content from the specified page range, including tables

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Thrown when:

    • Either page is less than 1
    • endPage is less than startPage
    • Either page exceeds total pages

    GetRawText()

    Gets the raw text of the document, excluding tables

    Returns only the text content, without any table content.

    Declaration
    public string GetRawText()
    Returns
    Type Description
    System.String

    GetRawTextByPage(Int32)

    Gets raw text for a specific page

    Returns only the text content from the specified page, without any table content.

    Declaration
    public string GetRawTextByPage(int pageNumber)
    Parameters
    Type Name Description
    System.Int32 pageNumber

    Page number (1-based)

    Returns
    Type Description
    System.String

    Text content from the specified page

    GetRawTextByPageRange(Int32, Int32)

    Gets raw text for a page range

    Returns only the text content from the specified page range, without any table content.

    Declaration
    public string GetRawTextByPageRange(int startPage, int endPage)
    Parameters
    Type Name Description
    System.Int32 startPage

    Starting page number (1-based, inclusive)

    System.Int32 endPage

    Ending page number (1-based, inclusive)

    Returns
    Type Description
    System.String

    Text content from the specified page range

    GetTableByPageAndIndex(Int32, Int32)

    Gets a specific table by page number and table index on that page

    Returns the table at the specified index on the specified page.

    Declaration
    public TableObject GetTableByPageAndIndex(int pageNumber, int tableIndexOnPage)
    Parameters
    Type Name Description
    System.Int32 pageNumber

    Page number (1-based)

    System.Int32 tableIndexOnPage

    Table index on the page (0-based)

    Returns
    Type Description
    TableObject

    A TableObject representing the specified table, or null if not found

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Thrown when:

    • pageNumber is less than 1 or exceeds total pages
    • tableIndexOnPage is negative

    GetTablesByPage(Int32)

    Gets all tables from a specific page

    Returns a list of all tables found on the specified page.

    Declaration
    public List<TableObject> GetTablesByPage(int pageNumber)
    Parameters
    Type Name Description
    System.Int32 pageNumber

    Page number (1-based)

    Returns
    Type Description
    System.Collections.Generic.List<TableObject>

    List of TableObject instances representing tables on the page

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Thrown when pageNumber is less than 1 or greater than the total number of pages.

    GetTablesByPageRange(Int32, Int32)

    Gets all tables from a page range

    Returns a list of all tables found within the specified page range.

    Declaration
    public List<TableObject> GetTablesByPageRange(int startPage, int endPage)
    Parameters
    Type Name Description
    System.Int32 startPage

    Starting page number (1-based, inclusive)

    System.Int32 endPage

    Ending page number (1-based, inclusive)

    Returns
    Type Description
    System.Collections.Generic.List<TableObject>

    List of TableObject instances representing tables in the page range

    Exceptions
    Type Condition
    System.ArgumentOutOfRangeException

    Thrown when:

    • Either page is less than 1
    • endPage is less than startPage
    • Either page exceeds total pages
    ☀
    ☾
    Downloads
    • Download with Nuget
    • Start for Free
    In This Article
    Back to top
    Install with Nuget
    %s requires a valid license key for further deployment. Get Trial Below.
    ironsuite
    Blue key in circleGet Started for Free
    30 days full access • No credit card required
    Test in a live environment

    Test in production without watermarks.
    Works wherever you need it to.

    Fully-functional product

    Get 30 days of fully functional product.
    Have it up and running in minutes.

    24/5 technical support

    Full access to our support engineering team during your product trial

    Grey key in circleGet Started for Free
    The trial form was submitted successfully.
    Grey check in circleTrial key delivered
    Your key has been issued and sent to your email.
    Calendar in circleBook Free Live Demo
    No cards • no pitches • no commitments Pick a time for a quick, personalized demo
    Get the most out of your 30-day trial with:

    Live product and key features walk-through

    Project-specific recommendations

    All your questions answered

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation

    Want to deploy Iron Suite
    to a live project for FREE?

    What’s included?

    • Test in production without watermarks
    • 30 days fully functional product
    • 24/5 technical support during trial
    ironpdf Logo
    ironword Logo
    ironxl Logo
    ironppt Logo
    ironocr Logo
    ironbarcode Logo
    ironqr Logo
    ironprint Logo
    ironzip Logo
    ironwebscraper Logo
    Iron Software sales team
    Online 24/5
    Have Enterprise licensing requirements?
    Request Iron Suite Enterprise trial
    Key in blue circle

    Get your free 30-day Trial Key instantly

    Your trial license will be sent to your email address

    No limitations. 100% unlocked. No credit card.

    bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
    Or
    Key in blue circle

    Complete Your Trial Key Signup

    Tell us a little more about yourself.

    Key in blue circleNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
    Key in blue circle

    Your license key has been delivered to your inbox

    Can't find it? Check your spam folder.

    What’s next?
    Install with NuGet
    Add IronPDF to your project
    Quickstart Guide
    Helpful resources to get started

    Need help getting started?

    Book a Free Live Demo

    See IronPDF in action and get your licensing questions answered, or

    Key in blue circle

    Your demo request is in.

    You'll receive an invite via email shortly.

    What’s next?
    Explore Documentation
    Review Licensing Options
    badge_greencheck_in_yellowcircle
    Thank you
    Your trial key should be in the email.
    If it is not, please contact support@ironsoftware.com
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronPDF
    Your trial key should be in the email.
    If it is not, please contact support@ironsoftware.com