Hi all, I am working on a project where I want to be able to upload an image(pdf) of a form that was filled in by hand then to convert it into text that will be later saved in a database. I am hoping to use OCR for recognition but I've never used it before so any help will be appreciated.
This will be done in WPF and it's a desktop application.
Thank you
Loading
Viorel SPosted Jul 26, 2021, 1:10 AM
Kurt AmbrosePosted Jul 23, 2021, 1:36 PM
Jony GreenPosted Oct 12, 2015, 5:22 AM
George ericPosted Jun 20, 2012, 10:49 PM
George ericPosted Jun 20, 2012, 10:49 PM
Bennet RajPosted Jun 20, 2012, 10:00 AM
George ericPosted Apr 12, 2012, 10:05 PM
George ericPosted Apr 12, 2012, 9:52 PM
Avuya MxoliPosted Apr 12, 2012, 10:19 AM
George ericPosted Apr 11, 2012, 9:51 PM
Avuya MxoliPosted Apr 11, 2012, 2:06 PM
George ericPosted Apr 10, 2012, 5:39 AM
I am sorry that I don't know the direct solution to convert text from pdf to editable text. But I came up with this. You extract text from pdf and then write it to the editable text. How do you think?
With the help of Spire.PDF.
//Create a pdf document.
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(@"Sample2.pdf");
StringBuilder buffer = new StringBuilder(); images = new List();
IList
foreach (PdfPageBase page in doc.Pages)
{
buffer.Append(page.ExtractText());
foreach (Image image in page.ExtractImages())
{
images.Add(image);
}
}
doc.Close();
//save text
String fileName = "TextInPdf.txt";
File.WriteAllText(fileName, buffer.ToString());
//save image
int index = 0;
foreach (Image image in images)
{
String imageFileName
= String.Format("Image-{0}.png", index++);
image.Save(imageFileName, ImageFormat.Png);
}
//Launching the Text file.
System.Diagnostics.Process.Start(fileName);
}
Avuya MxoliPosted Apr 5, 2012, 7:22 AM