node-pdf-image icon indicating copy to clipboard operation
node-pdf-image copied to clipboard

error : message: 'Failed to convert page to image

Open SHocker-Yu opened this issue 8 years ago • 3 comments

Hi,i'm using this package now.But there is the error message. code:

 var fs = require('fs');
 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") // => true 
 }, function(err) {
    console.log(err);
 });

error: F:\parseWord>node pdf-img.js { message: 'Failed to convert page to image', error:

   { [Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "convert 'brochure.pdf[0]' 'brochure-0.png'"
   ������ - 'brochure-0.png'
   ]
     killed: false,
     code: 4,
     signal: null,
     cmd: 'C:\\WINDOWS\\system32\\cmd.exe /s /c "convert \'brochure.pdf[0]\' \'brochure-0.png\'"' },
  stdout: '',
  stderr: '������ - \'brochure-0.png\'\r\n' }

Is this about the imageMagic install? I have already installed it. What's the problem with this?

SHocker-Yu avatar Sep 07 '16 03:09 SHocker-Yu

No one have a clue of this? I having the same issue...

ghost avatar Jan 17 '18 18:01 ghost

please who solved this issue ?

Asma-Projects avatar Apr 16 '18 10:04 Asma-Projects

@SHocker-Yu @Asma-Projects @bruno-serfe Please look at this comment.

pkantsedalov avatar Dec 04 '18 13:12 pkantsedalov