fitraditya / node-pdf2img

A nodejs module for converting pdf into image file
MIT License
76 stars 51 forks source link

Error: Command failed: identify -format %n tmp/testpdf.pdf #12

Closed SHocker-Yu closed 7 years ago

SHocker-Yu commented 8 years ago

Hi,i'm using this package and i got the error like this:

F:\parseWord>node pdf2img.js
'identify' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�������ļ�
child_process.js:508
    throw err;
    ^

Error: Command failed: identify -format %n tmp/testpdf.pdf
'identify' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���

    at checkExecSyncError (c
```hild_process.js:465:13)
    at execSync (child_process.js:505:13)
    at async.waterfall.pages (F:\parseWord\node_modules\pdf2img\lib\pdf2img.js:47:32)
    at fn (F:\parseWord\node_modules\pdf2img\node_modules\async\lib\async.js:638:34)
    at Immediate._onImmediate (F:\parseWord\node_modules\pdf2img\node_modules\async\lib\async.js:554:34)
    at processImmediate [as _immediateCallback] (timers.js:383:17)

What can i do to figure out this problem?
LobeTia commented 8 years ago

Same problem here MacOS 10.11.6 ImageMagick 6.9.2-8 Graphicsmagick 1.3.23

matteocontrini commented 7 years ago

Take a look at #13

LucioGrimaldi commented 7 years ago

I tried the fix in these pull request but nothing is changed node doesn't recognize also che command gm (GrapghicMagick) but i successfully installed it from npm...

matteocontrini commented 7 years ago

@LuciusFx you need to install GraphicsMagick http://www.graphicsmagick.org/README.html

LucioGrimaldi commented 7 years ago

@matteocontrini of course i've installed the latest version from the website

matteocontrini commented 7 years ago

@LuciusFx you said you've installed GraphicsMagick from npm, but you can't from there. You need to install the binaries

LucioGrimaldi commented 7 years ago

@matteocontrini yes sorry i mean i tried both way but now i reinstalled gm and also ghostscript and now work but with an other problem :D the output file is 0 KB...

fitraditya commented 7 years ago

Now this module only requires GraphicsMagick.