我有一个pdf,我已经转换为.png 500dpi和600dpi。 (见下文)。 500dpi版本适用于jTessBoxEditor。但是,600dpi失败了。我已经尝试按照建议here增加JVM堆大小。即使是600 dpi的图像也只有91KB。即使我将JVM堆大小设置得非常大,也可以通过运行jTessBoxEditor:
export JAVA_HOME="/Library/Internet Plug-ins/JavaAppletPlugin.plugin/Contents/Home/" ## necessary to get latest java runtime environment because I am on a mac.
java -Xms1024m -Xmx2048m -jar jTessBoxEditorFX.jar
我仍然无法打开600dpi版本。相反,我在终端中遇到了很长的错误。其中的一些片段是:
java.lang.NullPointerException
at com.sun.javafx.sg.prism.NGCanvas$RenderBuf.validate(NGCanvas.java:213)
at com.sun.javafx.sg.prism.NGCanvas.initCanvas(NGCanvas.java:640)
at com.sun.javafx.sg.prism.NGCanvas.renderContent(NGCanvas.java:603)
at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:2053)
at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:235)
...
java.lang.NullPointerException
at com.sun.javafx.sg.prism.NGCanvas$RenderBuf.validate(NGCanvas.java:213)
at com.sun.javafx.sg.prism.NGCanvas.initCanvas(NGCanvas.java:640)
at com.sun.javafx.sg.prism.NGCanvas.renderForcedContent(NGCanvas.java:624)
at com.sun.javafx.sg.prism.NGGroup.renderForcedContent(NGGroup.java:198)
at com.sun.javafx.sg.prism.NGGroup.renderForcedContent(NGGroup.java:198)
at com.sun.javafx.sg.prism.NGGroup.renderForcedContent(NGGroup.java:198)
at com.sun.javafx.sg.prism.NGGroup.renderForcedContent(NGGroup.java:198)
...
at com.sun.javafx.sg.prism.NGNode.render(NGNode.java:1945)
at com.sun.javafx.tk.quantum.ViewPainter.doPaint(ViewPainter.java:477)
at com.sun.javafx.tk.quantum.ViewPainter.paintImpl(ViewPainter.java:330)
at com.sun.javafx.tk.quantum.PresentingPainter.run(PresentingPainter.java:91)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at com.sun.javafx.tk.RenderJob.run(RenderJob.java:58)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
at java.lang.Thread.run(Thread.java:745)
答案 0 :(得分:1)
我看到你做过同样的事情。除非您需要处理复杂的脚本,否则我建议您使用非JavaFX版本。