Open ankitrshah89 opened 8 years ago
@ankitrshah89 Did you resolve this? Got same issue when trying to convert svg to jpeg.
@ankitrshah89 I think you need to install ghostscript
brew install ghostscript
I had the same issue & this solved it for me
What about multipage PDFs? how to pipe it in different files?
Hi @eivindfjeldstad ,
Does imagemagick-stream support converting PDFs to images?
I wrote a test for the same :
const im = require('imagemagick-stream'); const fs = require('fs');
const read = fs.createReadStream(dirname + '/pdfs/samplePdf.pdf'); const write = fs.createWriteStream(dirname + '/pdfs/image-resized.png');
const resize = im(); read.pipe(resize).pipe(write);
Unfortunately I got this error: events.js:141 throw er; // Unhandled 'error' event ^
Error: convert: no decode delegate for this image format
' @ error/constitute.c/ReadImage/508. convert: no images defined
-' @ error/convert.c/ConvertImageCommand/3235.I tried to use convert which got installed as part of imagemagick through cli and I could successfully convert it.
Any ideas?
Thanks!