node-pdf2img icon indicating copy to clipboard operation
node-pdf2img copied to clipboard

Why is coming this err

Open chhaunkar96 opened this issue 7 years ago • 9 comments

I am a beginner plz help me. C:\Users\kaushal-pc\Desktop\nodejs\pdf2img>node pdf2img.js 'gm' is not recognized as an internal or external command, operable program or batch file. child_process.js:533 throw err; ^

Error: Command failed: gm identify -format "%p " "C:\Users\kaushal-pc\Desktop\nodejs\pdf2img/bharati.pdf" 'gm' is not recognized as an internal or external command, operable program or batch file.

at checkExecSyncError (child_process.js:490:13)
at execSync (child_process.js:530:13)
at C:\Users\kaushal-pc\Desktop\nodejs\node_modules\pdf2img\lib\pdf2img.js:72:23
at fn (C:\Users\kaushal-pc\Desktop\nodejs\node_modules\pdf2img\node_modules\async\lib\async.js:638:34)
at Immediate.<anonymous> (C:\Users\kaushal-pc\Desktop\nodejs\node_modules\pdf2img\node_modules\async\lib\async.js:554:34)
at runCallback (timers.js:651:20)
at tryOnImmediate (timers.js:624:5)
at processImmediate [as _immediateCallback] (timers.js:596:5)

==========================pdf2img.js============================

var fs = require('fs'); var path = require('path'); var pdf2img = require('pdf2img'); var input = __dirname+'/bharati.pdf'; pdf2img.setOptions({ type:'png', size:1024, denesity:600, output:'testx' }); pdf2img.convert(input,function (err, info) { if(err) console.log(err); else console.log(info);
});

chhaunkar96 avatar Jun 23 '17 20:06 chhaunkar96

I have the same issue

JoK-rgb avatar Jun 30 '17 13:06 JoK-rgb

Hello, seems like you used this module on windows. Currently it only support Linux dan OSX.

fitraditya avatar Jul 01 '17 13:07 fitraditya

thank you

chhaunkar96 avatar Jul 03 '17 06:07 chhaunkar96

Hi, I am also getting the same problem. I am using OSX.

/bin/sh: gm: command not found

amithealthist avatar Jul 20 '17 10:07 amithealthist

Have you install graphicmagick? Please install it first (using homebrew).

fitraditya avatar Jul 24 '17 06:07 fitraditya

Hi,I'm have the same issue.And I'm using CentOS6.9. I had installed the graphicmagick.

Error: Command failed: gm identify -format "%p " "/node/images/public/imgs/xxxxxxxxxx.pdf" /bin/sh: gm: command not found

danielchenyy avatar Nov 18 '17 07:11 danielchenyy

Hello, people, this still occurs on my too! How to fix this! Are any maintenance?

newasmod avatar Apr 01 '18 16:04 newasmod

@fitraditya i have installed it with brew, also installed with npm , also tried with sudo apt, nothing works, . Please HELP! i use linux min 18.1 its like ubuntu @amithealthist have you fixed it?

newasmod avatar Apr 04 '18 12:04 newasmod

when i download a zip file from github,' sqlite example' for react native and installing it on my phone getting the same error.any help...

Avinash2189 avatar Apr 11 '18 05:04 Avinash2189