I am trying to convert pdf to images in node.js app. For that I am using pdf-image
npm module.
I googled it and installed pdf-image
npm module and graphicsmagick
using apt-get install graphicsmagick
in linux os.
let pdfImage = new PDFImage("./file.pdf",{graphicsMagick: true,convertOptions: {
"-resize": "2000x2000",
"-quality": "75"
}});
pdfImage.convertFile().then((imagePaths)=>{
console.log(imagePaths)
cb(null,imagePaths)
},(err)=>{
cb(err)
});
In my local system its working fine and perfect.
But when I deployed this to my AWS ec2
instance and installed all required libraries but its throwing error
gm convert: Coder did not return an image (this is a bug, please report it!)
I am doing the same as local in ec2 instance but its not working.