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();
}