I need to make a minor modification to ccmain/pagesegmain.cpp so images get dumped to a temp directory instead of the default which is the tesseract working directory. I have this figured out but I am having trouble building the libtesseract304.dll. Are there any instructions anywhere where a java developer who has no experience with visual studio can figure this out? Here is a stackoverflow i posted: http://stackoverflow.com/questions/42140445/building-tesseract304-dll-with-source-code-modification I actually can get the project to build when running the tesseract.sln but when i take the .dll and replace it in the .jar it doesn't work. Please help. I could also go this route and get the code i wrote working with tesseract302 but I am baffled by this one as well: http://stackoverflow.com/questions/42144364/code-works-with-tess4j-with-tesseract-3-04-but-not-tesseract-3-02
Thanks for any advice or help or instructions. Been slamming my head against the wall for a week now
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We've been using the DLLs and VS solution/project from Charles Weld's site. Try to get it to compile successfully first before attempting to put in your custom change. Once you got a good DLL, then you can tell Tess4J-3.2.1 to use it by setting jna.library.path property.
Tesseract 3.02 is too far back that I cannot remember how we got the DLLs or compiled them, probably from his site as well.
Quan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Quan,
Thank you, I got it built. Now I am trying to get my app to use it. So if I call System.setProperty("jna.library.path", "C:/path/to/libtesseract304.dll"); it should use the .dll here and not the one inside the tess4j-3.2.1 jar? It is still using/loading the .dll's in the jar and not my custom build. Thanks for any clarification
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can see the modified .dll being loaded into c:/temp/jna folder and I also see the tess4j jar in the c:/temp directory that has win-32x86 and the gsdl32.dll, liblept173.dll, libtesseract304.dll and I'm getting an UnsatisfiedLinkError "%1 is not a valid Win32 application"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I need to make a minor modification to ccmain/pagesegmain.cpp so images get dumped to a temp directory instead of the default which is the tesseract working directory. I have this figured out but I am having trouble building the libtesseract304.dll. Are there any instructions anywhere where a java developer who has no experience with visual studio can figure this out? Here is a stackoverflow i posted: http://stackoverflow.com/questions/42140445/building-tesseract304-dll-with-source-code-modification I actually can get the project to build when running the tesseract.sln but when i take the .dll and replace it in the .jar it doesn't work. Please help. I could also go this route and get the code i wrote working with tesseract302 but I am baffled by this one as well: http://stackoverflow.com/questions/42144364/code-works-with-tess4j-with-tesseract-3-04-but-not-tesseract-3-02
Thanks for any advice or help or instructions. Been slamming my head against the wall for a week now
Brian,
We've been using the DLLs and VS solution/project from Charles Weld's site. Try to get it to compile successfully first before attempting to put in your custom change. Once you got a good DLL, then you can tell Tess4J-3.2.1 to use it by setting
jna.library.path
property.Tesseract 3.02 is too far back that I cannot remember how we got the DLLs or compiled them, probably from his site as well.
Quan
Quan,
Thank you, I got it built. Now I am trying to get my app to use it. So if I call
System.setProperty("jna.library.path", "C:/path/to/libtesseract304.dll");
it should use the .dll here and not the one inside the tess4j-3.2.1 jar? It is still using/loading the .dll's in the jar and not my custom build. Thanks for any clarificationI can see the modified .dll being loaded into c:/temp/jna folder and I also see the tess4j jar in the c:/temp directory that has win-32x86 and the gsdl32.dll, liblept173.dll, libtesseract304.dll and I'm getting an UnsatisfiedLinkError "%1 is not a valid Win32 application"
The error message indicates you have a bitness compatibility issue, either a 32-bit DLL with Java 64, or vice versa.
And look at the last code example in the Tutorial.
Last edit: Quan Nguyen 2017-02-18
figured it out. thanks
Last edit: brian boutin 2017-02-22