Hi,
I am not able to convert scanned pdf file having only one page to searchable pdf.I am using evaluation version to do this.I wanted to test if aspose can do this to go for license.
Error I am getting System.IndexOutOfRangeException: 'At most 4 elements (for any collection) can be viewed in evaluation mode.'
I am using this code
Document doc = new Document(@“C:\Test.pdf”);
doc.Convert(CallBackGetHocr);
doc.Save(@"C:\Editable.pdf");
static string CallBackGetHocr(System.Drawing.Image img)
{
string dir = @"C:\Temp\";
img.Save(dir + "ocrtest.jpg");
ProcessStartInfo info = new ProcessStartInfo(@"C:\Program Files (x86)\Blue Prism Limited\Blue Prism Automate\Tesseract\tesseract.exe");
info.WindowStyle = ProcessWindowStyle.Hidden;
info.Arguments = @"C:\Temp\ocrtest.jpg C:\Temp\out hocr";
Process p = new Process();
p.StartInfo = info;
p.Start();
p.WaitForExit();
StreamReader streamReader = new StreamReader(@"C:\Temp\out.hocr");
string text = streamReader.ReadToEnd();
streamReader.Close();
return text;
}