Open hatpick opened 7 years ago
From the documentation:
"quality": "75", // only used for types png & jpeg
you can change that by passing that property in the options object:
const options = {
quality: "100",
};
How's quality (0-100) gets translated to dpi?!
It doesn't... if you really need to set a custom dpi you can set it directly in the options object (it gets passed completely to the phantom executable so it should work that way)
const options = {
quality: "100",
dpi: 300
};
Otherwise you will have to look through phantom documentation on how to set it and edit the pdf_a4_portrait.js file to send the option. But if your problem is that your images have bad quality setting the quality property should be enough.
In my experiments, quality doesn't make any difference, btw I had it set to 100, I too read the documentation!
@frank-orellana Hi! Can you explain me how to do that? I need set a custom DPI. It works only for images? PDF?
+1
+1
The quality setting is only relevant when you set the "type" option as "png" or "jpeg".
I haven't found a way (yet) of increasing the image quality - but it really is awful.
Similar situation here. Anyone figured out a way to somehow force DPI?
I think I found a solution. Not sure which one made the difference:
I set these both and the images now come out crystal clear. I hope it helps someone.
What's the default dpi value? Is it configurable? My images have bad quality, I was wondering if that's the problem.