tcr / scissors

PDF manipulation in Node.js! Split, join, crop, read, extract, boil, mash, stick them in a stew.
Apache License 2.0
285 stars 45 forks source link

.getPageSizes doesn't work #28

Closed janschmutz closed 6 years ago

janschmutz commented 6 years ago

the method .getPageSizes doesn't work for me at all. I've tried it on all kinds of Pdf's it keeps throwing the error: throw new Error('identify encountered an error:\n', String(data));

var pdf = scissors('test.pdf')
    .getPageSizes().then(function(res) {
        console.dir(res);
    })
cboulanger commented 6 years ago

This is probably because you don't have imagemagick installed, which provides the identify binary. Sorry for not pointing this out in the documentation. I should do this right now. Can you confirm that you can make it work by installing imagemagick?

ThunderBoltEngineer commented 6 years ago

I have encountered same issue. Installed imagemagick package, but still not working.

[Resolved] Oh, globally installing imagemagick library did the trick !!! Using this : $ brew install imagemagick