Closed HerickRaposo closed 1 year ago
You would set the environment variable TESSDATA_PREFIX
in Windows.
https://superuser.com/questions/949560/how-do-i-set-system-environment-variables-in-windows-10
Does your example work with eng
pack? I suggest you get it to work with a console application first before moving on to a server application.
No response from OP.
I'm developing a routine in my JAVA Web project (Using netbeans 13) where I extract the texts from a pdf. If it doesn't find a certain term, it converts the pdf to image and tries to extract the text with OCR tesseract. After several attempts I always got the same error regardless of the configuration I did. Following error:
I'm having difficulties configuring the library in my development environment because, unlike the tutorials where SpringBoot and Eclipse are used, I use Netbeans 13 and I have the following project structure:
First I added the dependency in pom.xml:
After that as indicated in some tutorials, I went to my tessdata folder which is in dependencies/Tes4j and copied the tessdata folder to the web-inf folder (I also tried to the resources folder).
Later I tried to configure the environment variable TESSDATA_PREFIX. I couldn't find information if this variable was to be defined in the windows system variables or if there is some other place in netbeans to define this. In my project structure I tried three definitions but none worked:
In the code of my method I tried to set the datapath passing only the name tessdata, data and I also tried to point out the paths above. Follow created method:
My tessdata folder:
My development environment:
Netbeans:13
JDK 15
tess4j:5.2.0
My doubts:
So I would like to know if this environment variable () is configured in windows variables, in netbeans or in some internal place in my code? Also, did I skip any steps? Do I need to download anything else? Please help me, I don't know what else to do!