Same Quality Conversion From PDF to Image in RMagick
Today one of my tasks was to convert a pdf to a png of the same quality, but sadly, all my attempts were all low resolution.
So after a little research on the documentation i found out the density option, which by default is 72. PDF is around 300, so 200 is a good tradeoff (at least, for now).
Also, i found a little bit misguiding that in some guides , the density declaration is after the write function, while should be right after you read the file….by the way, here is a nice example! Enjoy!
1 2 3 4 5 6 7 8