Simple way to extract Text from PDF in C# .Net?
Key Features
PDF to Word, RTF
PDF to Word, DOCX
PDF to Images: JPEG, TIFF
PDF to Excel
>>PDF to Text
Download trial
Code examples
Video Tutorials
API Reference
Version History

Simple way to extract Text from PDF in C# .Net?

Simple way to extract Text from PDF in C# .Net?


     If you are looking for a .NET library to extract text data from PDF, you are in the right place. PDF Focus .Net helps you extract text from any PDF document.

To illustrate how to easily extract text from PDF, let's look at simple code in C#:
           SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();


            if (f.PageCount > 0)
You will be able extract a text from a whole document or from specific pages. The library extracts good-looking text without unwanted spaces between the letters in words and supports Unicode symbols.

Furthermore, a text layout looks the same as in the RTF with proper line breaks and columns.

Nuget  Online Demo   Download, (Mar 27-th, 2020)

Have a Question?

You have a question, need a support or a code example: ask our support team at We will help you quickly and with pleasure.

What PDF Focus .Net gives me:

  1. Save time and cost of the product development. The writing of own PDF converter in C# requires a lot of days of hard work and takes approx 100 000 C# code lines. PDF Focus .Net will save a lot of my time and I'll need only to add the reference to "SautinSoft.PdfFocus.dll" and write 3-4 C# code lines.

  2. The one product provides me by set of API to convert PDF at various formats at once: Word, DOCX, RTF, Excel, HTML, Text, Multipage TIFF, Jpeg, PNG.

  3. Because of this is absolutely standalone PDF library, my clients don't need to have Adobe Acrobat, MS Word, Excel or other software.

  4. My software will have the one of the fastest API to convert PDFs inside, you may check this.

  5. I can select the any of product editions: Total, Office, HTML and Picasso. This saves my money. Let's us say, that I'm looking for only the API to convert PDF to HTML and don't need other features. Given this point, I can purchase the "HTML" edition of PDF Focus .Net. It's much cheaper than competitor's price.

  6. The one time price. I pay a one time and can use «PDF Focus .Net» for a whole life without any additional fees. My license will never expires.

  7. As bonus, I get unlimited technical support during a whole life for free and independently of the date of my purchasing.

Some examples to convert PDF to Text in C# and VB.Net

1. Convert PDF file to Text using C#:

           SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
            f.OpenPdf(@"d:\Cook Book.pdf");

            if (f.PageCount > 2)
                //Convert only pages from 2 to 3 in Text
                f.ToText(@"d:\Cook Book.txt", 2, 3);
2. Convert whole PDF document to Text in memory using C#:
           SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();

            //Read PDF to byte array
            byte[] pdf = File.ReadAllBytes(@"d:\Sample.pdf");


            if (f.PageCount > 0)
                string text = f.ToText();

                //Save to text file
                File.WriteAllText(@"d:\Sample.txt", text);
3. Extract Text from all pages of PDF in ASP.Net/VB.Net:
        Dim f As New SautinSoft.PdfFocus()
        Dim url As New Uri("")

        If f.PageCount > 0 Then
            'Convert whole PDF to Text (extract text from PDF)
            Dim text As String = f.ToText()

            'show text
            TextBox1.Text = Text

            TextBox1.Text = "Converting failed!"
        End If
4. Convert 1st page of PDF to Text in VB.Net:
        Dim f As New SautinSoft.PdfFocus()

        Dim pdf() As Byte = File.ReadAllBytes("d:\Simple.pdf")
        Dim text As String = ""


        If f.PageCount > 0 Then
            text = f.ToText(1, 1)

            'show text
            If text <> "" Then
                TextBox1.Text = text
            End If
        End If
If anyone needs a code sample in C#, VB.Net, ASP.Net etc "How to extract Text from PDF", email us at or ask at Online Chat (right-bottom corner of this page). We'll help you certainly!

Requirements and Technical Information

     Requires only .NET Framework 4.0 or higher. Our product is compatible with all .NET languages and supports all Operating Systems where .NET Framework and .NET Core can be used. Note that PDF Focus .Net is entirely written in managed C#, which makes it absolutely standalone and an independent library.

.NET Framework 4.0 and higher and .NET Core 2.0 and higher

.NET Framework 4.0, 4.5, 4.6.1 and higher. The old version for old .NET 2.0 can be found here.

.NET Standard 2.0

.NET Core 2.0 and higher.

Multi-platform component, runs on:

Our component has proven itself on cloud platforms and services:

  • Microsoft Azure
  • Amazon Web Services (AWS)
  • Google Cloud Platform
  • SharePoint
  • Docker
  • etc.

Reasonable prices

     The library offers developers the high quality conversion at reasonable prices. The main point of interest is that PDF Focus .Net is less expensive than all of its more or less popular counterparts. For example, a single license for PDF Focus .Net - HTML Edition cost $499(US) and the Total Edition starts from $778(US).


To see this functionality firsthand, download the freshest «PDF Focus .Net» with code examples, 104.0 Mb.


  • Sweden, Stockholm
  • Mortviksvagen 68B 142 43 SKOGAS
  • Tel: +46 812111486
  • Email:
    Copyright © 2002 - 2020 SautinSoft (started from All rights reserved.