the wrapper works at the moment not with an 64 bit maschine You get an gsdll32 link not found error. I did changed it to gsdll64 in the GhostschriptLibrary but the call will end without error but even without result.
regerds
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK, thank you for testing…
I don't have any Windows machine (not even a 32bits)… So I can't test it.
Changing gsdll32 to gsdll64 should be enough however…
Just in case: is your JVM 64btis as well?
Regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2011-07-07
My JVM is 64 bit as well. But it work now without problems. I read the gs dll api and just add the gswin64.exe call when i develop on my windows machine.
Hi,
the wrapper works at the moment not with an 64 bit maschine You get an gsdll32 link not found error. I did changed it to gsdll64 in the GhostschriptLibrary but the call will end without error but even without result.
regerds
OK, thank you for testing…
I don't have any Windows machine (not even a 32bits)… So I can't test it.
Changing gsdll32 to gsdll64 should be enough however…
Just in case: is your JVM 64btis as well?
Regards
My JVM is 64 bit as well. But it work now without problems. I read the gs dll api and just add the gswin64.exe call when i develop on my windows machine.
List<String> listArgs = new ArrayList<String>();
if (Platform.isWindows()){
listArgs.add("gswin64.exe");
}
listArgs.add("-sDEVICE=ljet4");
listArgs.add("-dNOPAUSE");
listArgs.add("-dBATCH");
listArgs.add("-dSAFER");
listArgs.add("-sOutputFile="+ outputFile.getAbsolutePath());
listArgs.add("-dNOPROMPT");
listArgs.add("-q");
listArgs.add("-f");
listArgs.add(sourceFile.getAbsolutePath());
gs.initialize(listArgs.toArray(new String));
gs.exit();
Btw, you should add a method in you api to to choose which gs version (32 or 64 bit) should be used (gsdll32 or gsdll64)
I will… But you told me that changing gsdll32 to gsdll64 did not work…
see my post before. It work when i add the gswin64.exe argument
OK… Sorry I did not see it :)
However it would be nice if I could detect 32 / 64 bits version automatically….
Maybe I could add a try / catch section when I load the native library: I first try 32 bits, and if not found: I try 64 bits…
Well. It seems it depends on which JVM is used on a win 64 platform. Maybe checking first the JVM which is used and then choose the right gsdllXX
-Djna.library.path="ghostscript32bitVersion/bin" work NOT with a JVM 64 so far.
OK, thanks!!
So I will check the JVM version and load the right library according to what I find…
System.getProperty("sun.arch.data.model") gives you a String with 32 or 64
Anyway. Thanks so far.
Thanks a lot !!
You did all the job :)
I just released a version 0.4.4 with the architecture detection for library loading.