Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command failed: gm convert: Unable to open file (C:\Windows\TEMP\gmQXbr1D) [No such file or directory]. #157

Open
enoh-barbu opened this issue Aug 26, 2022 · 4 comments

Comments

@enoh-barbu
Copy link

I'm trying to convert a PDF from a buffer

const storeAsImage = fromBuffer(
      toBuffer(pdfBytes),
      {
          savePath: path.resolve(__dirname, '../flatten-images'),
          format: 'png'
      }
  );
  await storeAsImage(1);

but I get an error in the console

Error: Command failed: gm convert: Unable to open file (C:\Windows\TEMP\gmQXbr1D) [No such file or directory].

    at ChildProcess.onExit (D:\project\node_modules\gm\lib\command.js:301:17)
    at ChildProcess.emit (node:events:527:28)
    at ChildProcess.emit (node:domain:475:12)
    at ChildProcess.cp.emit (D:\project\node_modules\gm\node_modules\cross-spawn\lib\enoent.js:40:29)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  code: 1,
  signal: null
}

I'm using node v16, windows 10 and I do have installed graphicsmagick & ghostscript

@enoh-barbu enoh-barbu changed the title Command failed: gm convert Command failed: gm convert: Unable to open file (C:\Windows\TEMP\gmQXbr1D) [No such file or directory]. Aug 26, 2022
@Vrajs16
Copy link

Vrajs16 commented Sep 16, 2022

Which version of Ghostscript are you using for windows. According to this, you need version 9.52 which you can find from the link.

@enoh-barbu
Copy link
Author

yes, I was using 9.52

@kdash1228
Copy link

@enoh-barbu - Were you able to figure out a workaround or a solution for this error message?

@enoh-barbu
Copy link
Author

@kdash1228 not really. I dropped the library, I'm using only ghostscript commands now for achieving the same result

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants