Error in deleteing Java Temp file using Ghost4j sample code
Hi I tried to run http://ghost4j.sourceforge.net/highlevelapisamples.html PDF to PS sample code and it produce this err开发者_StackOverflow中文版or for me "ERROR: Temporary file /var/folders/8a/8a7E-LirFfeAJh+EC93W4U+++TY/-Tmp-/ghost4j/java.io.FileOutputStream@252f09991304994155878469 cannot be deleted" has anyone encounter this before and currently I am running on mac. Thanks!
Hi I had the same problem, but on windows 7..but I think is for the same reason.
problem was that ghost4j couldn't find the ghostscript libraries so it was failing here
result = GhostscriptLibrary.instance.gsapi_set_stdio(getNativeInstanceByRef().getValue(), stdinCallback, stdoutCallback, stderrCallback);
when trying to initialise the ghostscript libraries.
So I moved the library files to the directory in which I imported the sources. As I'm running a 64 bit system I also had to change their name in "GhostscriptLibrary.java".
I found the library files installing ghostscript from http://downloads.ghostscript.com/public/
I'm quite sure is not the best way of solving the problem, but it worked for me.
hope it will help you.
精彩评论