We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert Scanned PDF to Searchable PDF C# using Aspose.PDF for .NET


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”);


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;
        StreamReader streamReader = new StreamReader(@"C:\Temp\out.hocr");
        string text = streamReader.ReadToEnd();
        return text;


Can you please share source files so that we may further investigate to help you out.


Adding more to comments by Adnan, the exception is occurring due to evaluation version of the API. Please try using API with valid license and in case you do not have one, please consider applying for 30-days free temporary license which will help you evaluating the API without any limitation.