Is there any alternative to set file


i am trying to set file using setResource() but it gives error,method is not define for ocr engine is there any alternative to set file

String resource = “D:\DMS\”;
ocr.setResource(new FileInputStream(resource ));



It seems that you are using some old code snippet. Please visit the link Working with Different Languages for details on how to load resource file. Furthermore it is always recommended to use latest version of the API as it contains new features and bug fixes.