EVO PDF to Text Library for .NET
================================

EVO PDF to Text Library for .NET (Classic) can be used in .NET Framework, .NET Core and .NET Standard applications to extract text from PDF documents and search text in PDF documents.

You can see the https://www.evopdf.com/evopdf-pdf-to-text-dotnet product page for a complete list of library features.

This package is compatible with .NET Framework, .NET Core and .NET Standard 2.0 on Windows platforms.

For applications that need to run on both Windows and Linux platforms, you can use the EvoPdf.Next.PdfProcessor package, which allows you to extract text and images from PDF documents, search text in PDF documents and convert PDF pages to images.

Main Features
=============

* Extract text from PDF documents
* Search text in PDF documents
* Save the extracted text using various text encodings
* Case sensitive and whole word options for text search
* Support for password-protected PDF documents
* Extract the text or search only a range of PDF pages
* Extract text preserving the original PDF layout
* Extract text in PDF reading order or PDF internal order
* Get the number of pages in a PDF document
* Get the PDF document title, keywords, author and description
* Does not require Adobe Reader or other third-party tools

Compatibility
=============

The compatibility list includes the following .NET versions, platforms and application types:

* .NET Framework 4.0 and above
* .NET 10, 9, 8, 7, 6
* .NET Standard 2.0
* Windows platforms
* Azure App Service
* Azure Cloud Services and Azure Virtual Machines
* Web, Console and Desktop applications

Getting Started
===============

You can quickly start with the demo applications from the Samples folder of this package or integrate the library into your own project.

Reference the Library in .NET Framework Projects
------------------------------------------------

In your .NET Framework project add a reference to the EvoPdfToText.dll assembly from the Lib/net40 folder of this package or to the EvoPdf.PdfToText NuGet package.

Reference the Library in .NET Core Projects
-------------------------------------------

In your .NET Core project add a reference to the EvoPdf.PdfToText NuGet package.

Alternatively you can reference the EvoPdfToText_NetCore.dll library directly from the Lib/netstandard2.0 folder of this package, but in this case you also have to manually reference the dependencies of the EvoPdf.PdfToText package for .NET Standard 2.0.

After adding a reference to the library to your project, you are ready to start writing code to convert PDF to text in your .NET application.
You can copy the C# code lines from the section below to extract the text from a PDF document to a .NET string and to search text in a PDF document and get all its locations in PDF pages.

C# Code Samples
---------------

At the top of your C# source file add the 'using EvoPdf.PdfToText;' statement to make available the EVO PDF to Text API for your .NET application.

    // add this using statement at the top of your C# file
    using EvoPdf.PdfToText;

To extract all the text from a PDF file to a .NET String and save the extracted text to a file you can use the C# code below.

    // create the converter object in your code where you want to run conversion
    PdfToTextConverter converter = new PdfToTextConverter();
    
    // extract the text from PDF
    string extractedText = converter.ConvertToText("my_pdf_file_path");
    
    // write the .NET string to a text file
    System.IO.File.WriteAllText("PdfToText.txt", extractedText, System.Text.Encoding.UTF8);

To search a text in a PDF file and retrieve all its locations in PDF pages you can use the C# code below.

    // create the converter object in your code where you want to run conversion
    PdfToTextConverter converter = new PdfToTextConverter();
    
    // search text with case sensitive and whole word options
    string textToFind = "PDF";
    bool caseSensitive = false;
    bool wholeWord = false;
    FindTextLocation[] locations = converter.FindText("my_pdf_file_path", textToFind, caseSensitive, wholeWord);

    // use the found text locations
    foreach (FindTextLocation location in locations)
    {
        float textXPos = location.X; 
        float textYPos = location.Y;
        float textWidth = location.Width;
        float textHeight = location.Height;
    }

Free Trial
==========

The evaluation package for .NET contains the product binaries and demo web and desktop projects with full C# code for .NET Framework and .NET Core.

You can evaluate the library for free as long as needed to ensure that the solution fits your application needs.

Licensing
=========

The EVO PDF Software licenses are perpetual which means they never expire for a version of the product and include free maintenance for the first year. You can find more details about licensing on https://www.evopdf.com/buy page of the website.

Support
=======

For technical and sales questions or for general inquiries about our software and company you can contact us using the email addresses from https://www.evopdf.com/contact page of the website.

