IronSoftware
  • Products
    Read, edit, and sign PDFs Image to text in 127 languages Read and write QR & Barcodes No Office Interop required Extract structured data from websites 5 for the Price of 2 All 5 .NET product licenses from $798 Save 60% with Iron Suite
  • About Us
  • Home
  • Licensing
  • Get Started
  • Features
  • Code Examples
  • Tutorials
  • FAQ
  • API Reference
  • Support
IronPDF Library for C#
  • Home
  • Licensing
  • Docs
    • Get Started
    • Features
    • Code Examples
    • Tutorials
    • FAQ
    • API Reference
    • Support
  • Install with NuGet
Iron Pdf
IronPDF
Code Examples
  1. IronPDF
  2. Code Examples
  3. Reading PDF Text
nuget   download  help
Iron Pdf
HTML to PDF HTML Files to PDF URL to a PDF ASPX Pages to PDF ASPX To PDF Settings Images To PDF TIFF to PDF Rasterize a PDF to Images PDF Generation Settings Async PDF Generation Set Temp PDF File Path
Headers & Footers HTML Headers & Footers PDF Forms Responsive HTML to PDF Backgrounds & Foregrounds
Passwords, Security and MetaData Editing PDFs Outlines & Bookmarks Annotations Digital Signatures Stamping New Content Watermarking Reading PDF Text Paper Printing PDFs

Reading PDF Text

 //Rendering PDF documents to Images or Thumbnails
using IronPdf;
using System.Drawing;

//  Extracting Image and Text content from Pdf Documents

// open a 128 bit encrypted PDF
PdfDocument PDF = PdfDocument.FromFile("encrypted.pdf", "password");

//Get all text to put in a search index
string AllText = PDF.ExtractAllText();

//Get all Images
IEnumerable<System.Drawing.Image> AllImages = PDF.ExtractAllImages();

//Or even find the precise text and images for each page in the document
for (var index = 0; index < PDF.PageCount; index++) {
    int PageNumber = index + 1;
    string Text = PDF.ExtractTextFromPage(index);
    IEnumerable<System.Drawing.Image> Images = PDF.ExtractImagesFromPage(index);
    ///...
}
'Rendering PDF documents to Images or Thumbnails
Imports IronPdf
Imports System.Drawing

'  Extracting Image and Text content from Pdf Documents

' open a 128 bit encrypted PDF
Private PDF As PdfDocument = PdfDocument.FromFile("encrypted.pdf", "password")

'Get all text to put in a search index
Private AllText As String = PDF.ExtractAllText()

'Get all Images
Private AllImages As IEnumerable(Of System.Drawing.Image) = PDF.ExtractAllImages()

'Or even find the precise text and images for each page in the document
For index = 0 To PDF.PageCount - 1
	Dim PageNumber As Integer = index + 1
	Dim Text As String = PDF.ExtractTextFromPage(index)
	Dim Images As IEnumerable(Of System.Drawing.Image) = PDF.ExtractImagesFromPage(index)
	'''...
Next index
Read more
Try IronPDF free for development
Download Free
C# Object Reference and Get Started Tutorials
Object Reference
C# Library Licensing
Licensing
.Net Developer Support
Ask a Question

Reading PDF Text

IronPDF allows developers to easily extract the full text and images from almost any PDF file. This PDF OCR behavior is particularly useful when building search indexes.

Previous Example
Next Example

The C# PDF solution you've been looking for.

.Net Developer Support

Support

Open a support ticket with our development team.

Ask a Question
C# Object Reference and Get Started Tutorials

Documentation

View code examples and tutorials.

Get Started
C# Library Licensing

Licensing

Free for development. License from $399.

See Licenses
Install The C# PDF library

Try IronPDF Free

Get set up in 5 minutes.

Download
Try IronPDF for Free
Get Set Up in 5 Minutes
C# Nuget Library for PDF
Install with NuGet
Version 2021.3.1
Install-Package IronPdf
nuget.org/packages/IronPdf/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronPdf"
  3. Select the package and install
C# PDF DLL
Download DLL
Version 2021.3.1
Download Now
Manually install into your project
  1. Download and unzip IronPDF to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronPdf.dll"
Licenses from $399

Have a question? Get in touch with our development team.

Now that you’ve downloaded IronPDF
Want to deploy IronPDF to a live project for FREE ?
IronPDF is always free for development.
With a deployment trial license, you can test and share your project in a live environment with no watermarks.
Get your free
30-day Trial License Key
instantly.
Your Trial License Key has been emailed to you.
Full licenses for every project,
starting from $399
View Licenses
Have a question? Get in touch with our development team.
Want to deploy IronPDF to a live project for FREE ?
IronPDF is always free for development.
With a deployment trial license, you can test and share your project in a live environment with no watermarks.
Get your free
30-day Trial License Key
instantly.
Your Trial License Key has been emailed to you.
Download IronPDF free to apply
your Trial Licenses Key
Install with Nuget DLL Download
Licenses from $399. Have a question? Get in touch.
Install with Nuget
Iron Software LLC
205 N. Michigan Ave.
Chicago, IL 60611 USA
Copyright ©  2013-2021
Terms
|
Privacy
IronPDF IronOCR IronBarcode IronXL IronWebScraper
About Us Contact Us
IronPDF
Ask a Question Documentation Tutorials API Reference
Licensing
Get Licensed Support & Updates Extensions Using License Keys EULA Credits