Не удалось загрузить библиотеку 'gsdll32'

Я запускаю следующий код для создания bmp-изображения из pdf с помощью Ghost4j

У меня есть команда, которая выполняется генератором GhostScript для создания Bmp-изображения страницы из pdf. Код:

package ghost;

import net.sf.ghost4j.Ghostscript;
import net.sf.ghost4j.GhostscriptException;

public class GhostDemo {
public static void main(String[] a){
    Ghostscript gs = Ghostscript.getInstance(); //create gs instance
    String[] gsArgs = new String[10];/*command string array*/
    gsArgs[0] = "-dUseCropBox";/*use crop box*/
    gsArgs[1] = "-dNOPAUSE";
    gsArgs[2] = "-dBATCH";
    gsArgs[3] = "-dSAFER";
    gsArgs[3] = "-r300";
    gsArgs[4] = "-sDEVICE=bmp16m";
    gsArgs[6] = "-dTextAlphaBits=4";
    gsArgs[5] = "-sOutputFile=C:/PagesWorkspace/1/masterData/1.bmp";/*bmp file location with name*/
    gsArgs[6] = "C:/MasterWorkspace/pipeline.pdf";/*pdf location with name*/

    try {

        gs.initialize(gsArgs);  /*initialise ghost interpreter*/
        gs.exit();

    } catch (GhostscriptException e) {
       e.printStackTrace();
    }
}
}

я получаю исключение

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library 'gsdll32': The specified module could not be found.

    at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:145)
    at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:188)
    at com.sun.jna.Library$Handler.<init>(Library.java:123)
    at com.sun.jna.Native.loadLibrary(Native.java:255)
    at com.sun.jna.Native.loadLibrary(Native.java:241)
    at net.sf.ghost4j.GhostscriptLibraryLoader.loadLibrary(GhostscriptLibraryLoader.java:36)
    at net.sf.ghost4j.GhostscriptLibrary.<clinit>(GhostscriptLibrary.java:32)
    at net.sf.ghost4j.Ghostscript.initialize(Ghostscript.java:292)
    at ghost.GhostDemo.main(GhostDemo.java:22)

Может ли кто-нибудь сказать мне, почему я получаю это исключение?

5
задан Rohit Kumar 16 June 2012 в 07:46
поделиться