Guide for C#
Core Document Formats
Additional Features

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

C# PDF to Text (TXT) Converting Library to Convert PDF to Text

Visual C#
Home > .NET Imaging SDK > C# > Convert PDF to Text
If this is your first time to use our DocImageSDK, we strongly suggest you reading How to Start first!

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.
Why do you need this advanced C#.NET PDF to text converter library SDK? Although there are several free or licensed converting methods to convert PDF documents to plain text format files on the market, 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.
For example, you can easily convert PDF document to text file using Adobe Reader. But the text file that is converted by this method loses the original PDF document layout and all the paragraphs are joining together. On the contrary, 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.
Actually, 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.
To help you have a better understanding of this advanced PDF to text converter control, we arrange this C#.NET online tutorial page in following layout.
  • Overview of RasterEdge PDF to text converter library SDK
  • How to use this PDF to text converting library in C#.NET class application
  • C#.NET method to convert PDF document to text file
  • Demo C# code for converting PDF to text file with good formatting
  • C#.NET PDF to text conversion FAQs
C# PDF to Text Converter Control Features
  • Mature C# PDF to text converting library, designed specifically for .NET developers
  • Support converting each source PDF document page to separate text file using C# code
  • All text content of target PDF document can be extracted and saved as new text file with good formatting
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.
  1. Integrate following RasterEdge C#.NET PDF to text converter SDK dlls into your C#.NET project assemblies;
    • RasterEdge.Imaging.Basic.dll
    • RasterEdge.Imaging.PDF.dll
  2. Activate the evaluation license key for RasterEdge DocImage SDK for .NET and place activated txt license file at your C# project bin folder;
  3. Now you can convert source PDF document to text file using the C# demo code we have offered below.
C# Method to Convert PDF to Text
This RasterEdge PDF to text converting method can help developers convert whole PDF document to one text file. And the outputted text file may even maintain the original footer of source PDF document, like page number.
public void ConvertPdftoTiff(string PDFInputFile, int PDFPageNumber, string TIFFOutputFile);
Sample C# Code for PDF to Text Conversion
The C# demo code below is used to illustrate how to convert each PDF document page to separate text file in .NET class application.
using RasterEdge.Imaging.Basic;
using RasterEdge.Imaging.Basic.Core;
using RasterEdge.Imaging.Basic.Codec;
using RasterEdge.Imaging.PDF;
using System.Diagnostics;


namespace RE__Test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{

RasterEdgeImaging PDF = new RasterEdgeImaging();
public void ConvertPdftoText();
{
PDFInputFile = (@"C:/1.pdf");
PDFPageNumber = "1";
TextOutputFile = OutputFormat.txt;
}
PDF.Save("OutputFormat.txt", SaveFormat.Txt);
}
}
}
C# PDF to Text Conversion FAQs
Q: Can RasterEdge C#.NET PDF to text converter library control support converting multi-column PDF document to multi-column text file?
A: Sorry, this function is not supported. Although our PDF to text converting library can not meet your request, it can convert multi-column PDF document to one-column text without mixing columns of text content together using C#.NET code.
More Tutorials!
Find more user guides with RasteEdge .NET Image SDK using Visual C# sample codings!


Recommend this to Google+