2
Answers

How to read text on PDF file and Image File using C# ?

HI,
 
We have an application which Gets a Scanned paper PDF files,
Our requirement is to read the text present on those files and  Save that text while user Uploads a PDF at that time.
Is it possible to do with.Net or please tell me if any other approaches are available. 
Answers (2)
0
Mohamed Abedallah

Mohamed Abedallah

NA 574 67 7y
With LEADTOOLS OCR features you can recognize text from almost all common image formats along with PDF files.
You can achieve that using LEADTOOLS with .NET code similar to this:
  1. IOcrEngine _ocrEngine;  
  2. _ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Advantage, false);  
  3. _ocrEngine.Startup(nullnullnullnull);  
  4. IOcrDocument ocrDoc = _ocrEngine.DocumentManager.CreateDocument();  
  5. ocrDoc.Pages.AddPage(inputFileName, null);  
  6. ocrDoc.Pages[0].Recognize(null);  
  7. // Save the result to a disk as plain text  
  8. string outputFileName = "output.txt";  
  9. ocrDoc.Save(outputFileName, Leadtools.Forms.DocumentWriters.DocumentFormat.Text, null);  
  10. _ocrEngine.Shutdown(); 
To see how it works, check this link:
http://demo.leadtools.com/JavaScript/OCR/index.html
0
Nilesh Patil

Nilesh Patil

NA 3.4k 7k 7y
Hi Tushar,
 
Refer below links
 
https://www.e-iceblue.com/Tutorials/Spire.PDF/Spire.PDF-Program-Guide/Read-PDF-Read-PDF-Images-and-Text-in-C-VB.NET.html
 
http://www.nullskull.com/q/10465415/read-image-text-from-pdf-file-to-itextsharp-in-aspnet-c.aspx