Tech Specs
How-to C#
How-to VB.NET
Convert PDF to Text
Work with Other SDKs
Convert PDF to Text
Home ›› XDoc.PDF ›› C# PDF: Convert PDF to Text

C#.NET PDF SDK - Convert PDF to Text in C#.NET

Empower C# Users to Convert PDF to Text (TXT) in Visual C# with .NET XDoc.PDF Converter Library

Best Visual C#.NET PDF converter SDK for converting PDF to text in Visual Studio .NET project

Powerful .NET control for batch converting PDF to editable & searchable text formats in C# class

Free evaluation library for exporting PDF to Text in both C#.NET WinForms application and ASP.NET WebForms

Support .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePoint

All text content of target PDF document can be copied and pasted to .txt files by keeping original layout

 C#.NET class source code for converting  each PDF document page to separate text file

Text in any fonts, colors and sizes, or highlighted characters are easy to be converted to plain text

Text can be extracted from scanned PDF image with OCR component

Professional PDF to text converting library from RasterEdge PDF document conversion SDK provides reliable and effective .NET solution for Visual C# developers to convert PDF document to editable & searchable text file. Different from other C# .NET PDF to text conversion controls, RasterEdge C# PDF to text converter control toolkit can convert PDF document to text file with good formatting.

Comparison with some other PDF tools convert PDF to text by a method loses the original PDF document layout and all the paragraphs are joining together, our C# PDF to text converter SDK successfully distinguishes itself from those existing PDF to text conversion software based on its good outputted text file quality.  The outputted text file, converted by our C# PDF to text converting library, is separated by page and all the paragraphs are well retained with nice formatting.

In addition, RasterEdge also provides other industry-leading methods to convert target PDF document to other editable file formats using Visual C# code, such as, PDF to HTML converter assembly, PDF to Word converter assembly and PDF to PNG converter control.

C#.NET DLLs: Use PDF to Text Converter Control in C#.NET

In this part, we will tell C# developers how to use RasterEdge PDF to text converting library in Visual C# .NET class application. What should be noted here is that our PDF to text converting library is built in Visual Studio 2005 and .NET Framework 2.0. Thus, please make sure you have installed VS 2005 or above versions and .NET Framework 2.0 or greater.

Integrate following RasterEdge C#.NET text to PDF converter SDK dlls into your C#.NET project assemblies;






















Use corresponding namespaces;

    using RasterEdge.Imaging.Basic;

    using RasterEdge.XDoc.Converter;

Note: When you get the error "Could not load file or assembly 'RasterEdge.Imaging.Basic' or any other assembly or one of its dependencies. An attempt to load a program with an incorrect format", please check your configure as follows:


       If you are using x64 libraries/dlls, Right click the project -> Properties -> Build -> Platform target: x64.


       If using x86, the platform target should be x86.

Activate the evaluation license key for RasterEdge DocImage SDK for .NET and place activated txt license file at your C# project bin folder;

Now you can convert source PDF document to text file using the C# demo code we have offered below.

How to Use C#.NET Demo Code to Convert PDF to Text in C#.NET

C# programming sample for PDF to text converting.

//  pdf convert to txt
DocumentConverter.ToDocument(@"C:\test.pdf", @"C:\test.txt", FileType.TXT);