mooz / node-pdf-image

Provides an interface to convert PDF's pages to png files in Node.js by using ImageMagick
MIT License
237 stars 87 forks source link

fix element id in command #14

Closed martin-magakian closed 8 years ago

martin-magakian commented 8 years ago

I maybe didn't understand exactly this extra piece of code.

Anyway it create command such as: convert 0 -density 1 400 2 -colorspace 3 RGB 4 -resize 5 2331 [...] when using you code with: pdfImage.setConvertOptions(["-density", "400", "-colorspace", "RGB", "-resize", "2331"]);

It now works for me on MacOSX.

mooz commented 8 years ago

Your usage of setConvertOptions is wrong. You should pass object instead of array:

    pdfImage.setConvertOptions({
      "-density": 300,
      "-trim": null
    });

Sorry for the lack of documentation. I'll improve the docs.

martin-magakian commented 8 years ago

Cool thanks