On Linux, actually export LD_LIBRARY_PATH is not needed as the installer knows to set the path correctly. I think it is similar on OSX; you would not need to set LD_LIBRARY_PATH as evidenced by your ability to run GS without doing extra thing.
That said, VietOCR uses Ghost4J 0.3.1 to talk to GhostScript, and from my brief research, Ghost4J may have some problems on OSX.
You may want to head to Ghost4J Forum and ask the author for assistance. Meanwhile, can you run VietOCR from the terminal and open a PDF file? I'd like to see the full error message. Thank you.
Quan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I really appreciate the reply.
I am not sure what I am doing but I will try to give the information you need...
First of all, I am running on Snow Leopard 10.6.8 (haven't upgraded yet because I need to do a backup which is time consuming and I need storage for it...)
I have tesseract installed in usr/local/bin
It was installed with macports
I have run it. It gives output (so far not very good)
I run as follows
$ java -jar VietOCR.jar 272.bmp out.txt
Tesseract Open Source OCR Engine v3.02.02 with Leptonica
Exit value = 0
Error: null
I will run more diagnostics later...
no output file as far as I can see.
Last edit: calculus_man 2014-02-11
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am running on mac os x 10.6.8 32bit, and I unzipped the install download, and open the vietocr jar file. When I open a pdf I get a message:
Could not initialize class net.sf.ghost4j.GhostscriptLibrary
Please download, install GPL Ghostscript from http://sourceforge.net/projects/ghostscript/files
and/or set the appropriate variable.
If I go to terminal, I can see that I have ghostscript installed and runs...I am not sure how
I installed it but: GPL Ghostscript 9.05 (2012-02-08)
locations:
libgs.dylib, libgs.9.dylib and libgs.9.10.dylib found in /opt/local/lib/
gs found: /opt/local/bin/gs and in /usr/local/bin/gs
from the usage page directions I see:
" To set path:
where in /usr/local/lib, libgs.so link to libgs.so.9.10 is located."
The meaning of the last sentence is unclear to me, so I am not sure if it means what I think it means.
Nonetheless,
I tried export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
and export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/local/lib
export shows
declare -x LD_LIBRARY_PATH=":/usr/local/lib:/opt/local/lib/"
Running vietOCR I get the same error message as above. Not sure how to proceed from here.
I am not so adept at linux things, so I appreciate any help, and please do give explicit information...
Last edit: calculus_man 2014-02-09
On Linux, actually
export LD_LIBRARY_PATH
is not needed as the installer knows to set the path correctly. I think it is similar on OSX; you would not need to setLD_LIBRARY_PATH
as evidenced by your ability to run GS without doing extra thing.That said, VietOCR uses Ghost4J 0.3.1 to talk to GhostScript, and from my brief research, Ghost4J may have some problems on OSX.
https://sourceforge.net/p/ghost4j/discussion/886757/thread/cecea8d5/
https://github.com/zippy1978/ghost4j/issues/14
https://github.com/zippy1978/ghost4j/issues/29
You may want to head to Ghost4J Forum and ask the author for assistance. Meanwhile, can you run VietOCR from the terminal and open a PDF file? I'd like to see the full error message. Thank you.
Quan
I really appreciate the reply.
I am not sure what I am doing but I will try to give the information you need...
First of all, I am running on Snow Leopard 10.6.8 (haven't upgraded yet because I need to do a backup which is time consuming and I need storage for it...)
I have tesseract installed in usr/local/bin
It was installed with macports
I have run it. It gives output (so far not very good)
I run as follows
$ java -jar VietOCR.jar 272.bmp out.txt
Tesseract Open Source OCR Engine v3.02.02 with Leptonica
Exit value = 0
Error: null
I will run more diagnostics later...
no output file as far as I can see.
Last edit: calculus_man 2014-02-11