Open Suyash-Purwar opened 3 years ago
Hi @Suyash-Purwar , will you be able to provide a snippet of your code?
Thanks for responding! Here's the snippet
const { fromPath } = require('pdf2pic');
const options = {
density: 100,
saveFilename: "untitled",
savePath: "./images",
format: "png",
width: 600,
height: 600
};
// Path to pdf is different in my case but it's of this exact format
const storeAsImage = fromPath("/path/to/pdf/sample.pdf", options);
const pageToConvertAsImage = 1;
storeAsImage(pageToConvertAsImage).then((resolve) => {
console.log("Page 1 is now converted as image");
return resolve;
});
@Suyash-Purwar , have you tried the solution mentioned in this page? https://stackoverflow.com/questions/66732199/how-to-fix-the-graphicsmagik-error-gm-convert-no-decode-delegate-for-this-imag
Hey @yakovmeister
I am having a problem installing the fonts. Below is the image of the prompt.
@Suyash-Purwar Hmmm.. I'm not sure why it's not installing. Can you try converting those fonts to .ttf format and install the .ttf font format?
I'll try and will get back to you asap. Thanks a lot!
@yakovmeister Converted the .pfb files to .tff format and installed them successfully. Error is still there. This is the pdf I'm trying to convert. input-pdf.pdf
I'm getting the same issue with a specific pdf. Did you find any solution for this? @Suyash-Purwar. @yakovmeister I'm using Ubuntu 20.04 LTS and GraphicsMagick 1.3.35 2020-02-23
I've got the same issue. Using this GraphicsMagick version fix the problem: GraphicsMagick-1.3.31-Q8-win64-dll Maybe the newer version isn't compatible with gs952w64.
I am getting this error when I use the exact code written in the npm documentation's first example.
I am using windows 10 64-bit architecture and have installed the following and added them in window's path:
What am I doing wrong? @yakovmeister