nodejs pdf to image conversion
<p>I am using <a href="https://www.npmjs.com/package/pdf-image" rel="noreferrer">https://www.npmjs.com/package/pdf-image</a>.</p>

<pre><code> var PDFImage = require("pdf-image").PDFImage;

            var pdfImage = new PDFImage("brochure.pdf");
            pdfImage.convertPage(0).then(function (imagePath) {
                // 0-th page (first page) of the slide.pdf is available as slide-0.png 
                fs.existsSync("slide-0.png") // =&gt; true 
            },function(err){
                console.log(err);
            });
</code></pre>

<p>But i am getting this error</p>

<pre><code> { message: 'Failed to convert page to image',
  error:
   { [Error: Command failed: /bin/sh -c convert 'brochure.pdf[0]' 'brochure-0.png'
   /bin/sh: 1: convert: not found
   ]
     killed: false,
     code: 127,
     signal: null,
     cmd: '/bin/sh -c convert \'brochure.pdf[0]\' \'brochure-0.png\'' },
  stdout: '',
  stderr: '/bin/sh: 1: convert: not found\n' }
</code></pre>

<p>Please help me how can i convert pdf to image using nodejs.</p>