【发布时间】:2014-10-26 20:35:35
【问题描述】:
我正在使用 Tess4J(围绕 tesseract 的 JNA 包装器),并尝试从单页 PDF 调用 tess.doOCR(myFile) 到 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
然后它就停在那里了。该程序没有进一步发展。
更新 --
看起来真正的问题来自这个错误:
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 下载。任何建议将不胜感激。
或者这与符号链接有关?
【问题讨论】:
标签: pdf tesseract ghostscript tess4j