0

I have a pdf that I have converted to .png at 500dpi and 600dpi. (see below). The 500dpi version works just fine with jTessBoxEditor. But, the 600dpi one fails. I have tried increasing the JVM heap size as suggested here. Even the 600 dpi image is only 91KB. Even when I set the JVM heap size quite large, by running jTessBoxEditor as:

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

I still fail to be able to open the 600dpi version. Instead, I get a very long set of errors in the terminal. Some snippets of these are:

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)

The 500dpi image is here: 500dpi png

and the 600dpi image is here: 600dpi png

Community
  • 1
  • 1
Michael Ohlrogge
  • 10,559
  • 5
  • 48
  • 76
  • I'm seeing the same thing you did. Unless you need to deal with complex scripts, I suggest you use the non-JavaFX version. – nguyenq Jun 25 '16 at 14:02
  • @nguyenq Perfect, yes, the version 1.6 on [sourceforge](https://sourceforge.net/projects/vietocr/files/jTessBoxEditor/) worked perfectly for 600 dpi .png files. Thank you! Do you want to move your comment to an answer to make it easier for others to find? Thanks for so much work and help from you on these tools! – Michael Ohlrogge Jun 25 '16 at 14:20

1 Answers1

1

I'm seeing the same thing you did. Unless you need to deal with complex scripts, I suggest you use the non-JavaFX version.

nguyenq
  • 8,212
  • 1
  • 16
  • 16