Page 1 of 1

Cannot OCR Capture

PostPosted:Sat Jul 06, 2024 8:00 am
by teera_w
I have tried to use OCR Capture, for normal String are worked fine.
But when tried Barcode type, will error and catalina.out shown error below.
How can I resolve it?
Code: Select all
2024-07-08 05:57:25,587 [http-nio-0.0.0.0-8080-exec-5] [okmAdmin] ERROR c.o.servlet.admin.OCRTemplateServlet - IOException: Unsupported BARCODE engine:
com.openkm.plugin.ocr.template.OCRTemplateException: IOException: Unsupported BARCODE engine:
        at com.openkm.plugin.ocr.template.OCRTemplateUtils.extractText(OCRTemplateUtils.java:125)
        at com.openkm.plugin.ocr.template.OCRTemplateUtils.extractText(OCRTemplateUtils.java:88)
        at com.openkm.servlet.admin.OCRTemplateServlet.check(OCRTemplateServlet.java:697)
        at com.openkm.servlet.admin.OCRTemplateServlet.doGet(OCRTemplateServlet.java:125)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at com.openkm.servlet.UserLoggingFilter.doFilter(UserLoggingFilter.java:33)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
...
Caused by: java.io.IOException: Unsupported BARCODE engine:
        at com.openkm.util.BarcodeUtils.getText(BarcodeUtils.java:66)
        at com.openkm.plugin.ocr.template.OCRTemplateUtils.extractText(OCRTemplateUtils.java:112)
        ... 111 common frames omitted
The Tessaract installed properly as shown below:
/usr/bin/tesseract ${fileIn} ${fileOut}
Code: Select all
Usage:
  /usr/bin/tesseract --help | --help-extra | --version
  /usr/bin/tesseract --list-langs
  /usr/bin/tesseract imagename outputbase [options...] [configfile...]

OCR options:
  -l LANG[+LANG]        Specify language(s) used for OCR.
NOTE: These options must occur before any configfile.

Single options:
  --help                Show this help message.
  --help-extra          Show extra help for advanced users.
  --version             Show version information.
  --list-langs          List available languages for tesseract engine.

Re: Cannot OCR Capture

PostPosted:Mon Jul 15, 2024 6:35 am
by jllort
The CE does not suppor bar code scanning. Your stacktrace is OpenKM professional edition. I suggest add a ticket in the OpenKM customer support.

Anyway, for the barcode you need to have zbarimg tool installed.