NickNaso / ghostscript4js

Ghostscript4JS binds the Ghostscript C API to the Node.JS world.
http://www.nacios.it
Apache License 2.0
66 stars 19 forks source link

Error when calling gs.executeSync #50

Closed papuruth closed 4 years ago

papuruth commented 4 years ago

(index):125 Uncaught Error: Sorry error happened executing Ghostscript command. Error code: -100 at Object.executeSync (E:\Adstream\ReactElectronApp\QPPElectron\qpp\node_modules\ghostscript4js\lib\ghostscript4js.js:56) at EventEmitter.ipcRenderer.on ((index):119) at EventEmitter.emit (events.js:182)

ipcRenderer.on('convert-pdf', (evt, args) => {
        try {
          const version = gs.version();
          console.log(version);
          gs.executeSync(
            `-sDEVICE=pngalpha -o my.png -sDEVICE=pngalpha -r144 ${args}`
          );
        } catch (err) {
          throw err;
        }
      });

args: path of pdf file

NickNaso commented 4 years ago

Hi @papuruth, we are working on a new updates for ghostscript4js. Cold you say if you obtain the error you reported after one single call of executeSync or maybe it is happen when you try to execute it multiple times?

NickNaso commented 4 years ago

Hi everybody, I'm closing the issue because the release 3.2.0 should solve the problem.