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

后端 未结 3 2249
醉话见心
醉话见心 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:27

    Resources I used: Windows 10 (tried on Windows Server 2016 as well), JAVA, MAVEN
    
    Status: Working good on my local as well as VM 
    
    1. Download  Tess4J-3.4.8  from here http://tess4j.sourceforge.net/  and set your ENV variable path under Advance System Setting 
    2. Get repo from MAVEN - 
    
    
    net.sourceforge.tess4j
    tess4j
    4.5.1
    
    
    org.ghost4j
    ghost4j
    1.0.1
    
    
    net.sourceforge.lept4j
    lept4j
    1.7.0
    
    
    3. Get libtesseract302.dll and copy to "C:\Windows\System32" folder 
    from here http://api.256file.com/libtesseract302.dll/en-download-56466.html
    do not forget to set your ENV variable path under Advance System Setting  
    
    4. Download and install Visual C++ 2015 Redistributable or VC++ 2017 Redistributable (I installed both )
    from here https://programmer.help/blogs/net.sourceforge.tess4j.tesseractexception-java.lang.nullpointerexception.html 
    
    then do restart your PC 
    
    5. on Safer side can have some Jar files if you dont have already in local - Please see image
    
    do not forget to set your ENV variable path for JARs under Advance System Setting 
    

提交回复
热议问题