Tesseract - ERROR net.sourceforge.tess4j.Tesseract - null

后端 未结 3 2264
醉话见心
醉话见心 2021-02-20 10:21

Created a java application that uses Tesseract in order to convert a given image or pdf to a string format, when running it on my machine as a unit test using junit it runs grea

3条回答
  •  忘掉有多难
    2021-02-20 10:37

    As @Piotr R mentioned the error was ghostscriptException.getCause() is null and the reason for that is that the path configured in the file object sent to Tesseract was not a valid one, now the definition of valid for Tesseract is a bit different then yours, he consider only a local address as valid, so when setting a file located on AWS S3 even if it's public it will throw an error. The solution was saving it locally and deleting it after Tesseract is done.

提交回复
热议问题