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

Free Support Forum - aspose.com

Aspose.OCR.1.7.0.Resources.zip issue

Hello,

i am currently using aspose 1.7 api, but there is no any “com.aspose.ocr.ResourcesSource” Class in this library but i need to call some of it…as i have seen on some example.
So, try to provide enough information about it, and thanks in adv…

String filePath = request.getParameter(“uploadImage”);
String imagePath = “E:/workspace1.5/”+filePath;
String xmlEtalonFileName = “englishStandarts”;
String fontCollectionFileName = “arialAndTimesAndCourierRegular.xml.bin”;
String resourcesFilePath = “E:\workspace1.5\resources.zip”;
OcrEngine ocr = new OcrEngine(ResourcesSource.BINARY_ZIP_FILE,
resourcesFilePath, xmlEtalonFileName, fontCollectionFileName);
ocr.getConfig().setNeedRotationCorrection(false);
File image = new File(imagePath);
ocr.setImage(image);
ILanguage language = Language.load(“english”);
ocr.getLanguages().addLanguage(language);
try {
if (ocr.process()) {
System.out.println("\ranswer -> " + ocr.getText());
}
} catch (Exception e) {
e.printStackTrace();
}

Hi Satyam,


Thank you for contacting Aspose support, and welcome to Aspose.OCR support forum.

First of all please note that we have split the existing thread to create a new one on your behalf. Reason being, it is recommended that each type of problem should be reported in a separate thread for better visibility. Moreover, you will now receive notifications when support representatives respond to your inquiry.

Regarding the original problem, we would strongly recommend you to upgrade the API to the latest version of Aspose.OCR for Java 1.9.0 [resources]. The new version has improved performance as well as better accuracy rate. With the latest release, we have also improved the mechanism to load the resource file while utilizing lesser memory. Please also check the documentation on how to perform OCR operation and other related articles.

In case you have any concerns or questions, please feel free to write back anytime.