wicked_pdf icon indicating copy to clipboard operation
wicked_pdf copied to clipboard

Image blurring in PDF

Open millie opened this issue 8 years ago • 6 comments

wicked_pdf seems to be blurring my image... any ideas why? I am specifying the absolute height and width of the image, so it doesn't seem to be that the size is being distorted.

in HTML image

in PDF image

millie avatar Apr 21 '16 23:04 millie

You may want to try disabling smart-shrink (disable_smart_shrinking: true) if you've got it enabled. That's been a source of weird display issues for me.

Otherwise, I've had issues like this with some older versions of wkhtmltopdf. What version are you using?

maxfierke avatar Apr 22 '16 02:04 maxfierke

@millie Did the above suggestions help?

unixmonkey avatar May 28 '16 04:05 unixmonkey

@unixmonkey unfortunately not.

I am using a recent version of wkhtmltopdf, so I don't think that's the culprit. I tried both disabling and not disabling smart-shrink, and that didn't work.

millie avatar May 31 '16 23:05 millie

@millie @unixmonkey Have anyone found a solution for that ?

pedroAquino avatar May 12 '20 15:05 pedroAquino

You could also try messing with the zoom and dpi options, and maybe making the paper size much larger than the HTML size, to prevent shrinkage, and see if that helps.

I just ran a google search for wkhtmltopdf blurry and came up with a number of dead end reports, some seem to be font-specific.

unixmonkey avatar May 12 '20 15:05 unixmonkey

I ended up solving it with zoom and dpi as @unixmonkey suggests.

millie avatar May 12 '20 16:05 millie