Don*_*dle 5 pdf tesseract ghostscript tess4j
我正在使用 Tess4J(Tesseract 的 JNA 包装器),并尝试tess.doOCR(myFile)从单页 PDF 调用 OCR 文本。
我安装了 GhostScript(通过使用yum install ghostscript),gs -h工作正常。
我的应用程序服务器正在使用64-bit JVM,并且我有gsdll64.dll,以及 64 位 tesseract dll 的liblept168.dll和libtesseract302.dll在类路径中。
tess.doOCR(myFile)调用时,会记录以下内容:
GPL Ghostscript 8.70 (2014-09-22)
Copyright (C) 2014 Artifex Software, Inc. All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
Run Code Online (Sandbox Code Playgroud)
但随后就到此为止了。该计划不再继续。
更新 -
看起来真正的问题来自这个错误:
java.lang.UnsatisfiedLinkError: Unable to load library 'tesseract': Native library (linux-x86-64/libtesseract.so) not found in resource path
环顾四周后,我没有找到一个方便的地方来找到这个libtesseract.so文件,而且我不确定如何才能将它放到我的 Linux 应用服务器上。我读到也许我需要下载一些 C++ 运行时,但我没有看到 Linux 的下载。任何建议将不胜感激。
或者这与符号链接有关?
修复对我来说很简单,只需从命令行执行 sudo apt-get install tesseract-ocr 即可。对于 Linux,您无需担心 DDL 库或 jvm 版本。从 apt-get 安装 tessearct 就可以了。
| 归档时间: |
|
| 查看次数: |
16799 次 |
| 最近记录: |