Menu

Problem with win 64 Bit

Help
Anonymous
2011-07-06
2013-04-29
  • Anonymous

    Anonymous - 2011-07-06

    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

     
  • zippy1978

    zippy1978 - 2011-07-07

    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

     
  • Anonymous

    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.

        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();

     
  • Anonymous

    Anonymous - 2011-07-07

    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)

     
  • zippy1978

    zippy1978 - 2011-07-07

    I will… But you told me that changing gsdll32 to gsdll64 did not work…

     
  • Anonymous

    Anonymous - 2011-07-07

    see my post before. It work when i add the gswin64.exe argument

     
  • zippy1978

    zippy1978 - 2011-07-07

    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…

     
  • Anonymous

    Anonymous - 2011-07-07

    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.

     
  • zippy1978

    zippy1978 - 2011-07-07

    OK, thanks!!

    So I will check the JVM version and load the right library according to what I find…

     
  • Anonymous

    Anonymous - 2011-07-07

    System.getProperty("sun.arch.data.model") gives you a String with 32 or 64

    Anyway. Thanks so far.

     
  • zippy1978

    zippy1978 - 2011-07-07

    Thanks a lot !!

    You did all the job :)

     
  • zippy1978

    zippy1978 - 2011-11-26

    I just released a version 0.4.4 with the architecture detection for library loading.

     

Log in to post a comment.