Wicked_pdf: Deformed font rendering on Heroku

Created on 31 Oct 2017  路  4Comments  路  Source: mileszs/wicked_pdf

I've tried to do some pdf files. In Heroku it does not work properly. In the debug mode is working well, and in localhost too.

When I generate a pdf in Heroku the border of the fonts does not render properly, the rounded parts become deformed.

I'm using the gem wkhtmltopdf-heroku
What can it be?
29.pdf

wkhtmltopdf

Most helpful comment

A bit late to this thread, but for others stumbling in here via Google, this seems to be an issue with Heroku's heroku-18 stack and wkhtmltopdf. Reverting to heroku-16 solved the issue for me.

All 4 comments

wkhtmltopdf is cutting off the bottom of the letters. I really needed to fix it

Also relates to: #469, #509, #674

Some fonts are just going to render differently across different systems, and a Linux font with the same name is likely a different version. Try installing that font specifically on the server, or loading it via a web-font resource.

Also try setting zoom: 1.3 or around that value. I've heard that sometimes works for this kind of deformation.

Try loading your site on a Linux desktop, and you'll probably spot font rendering differences sooner.

There is a good breakdown of the problem and many good suggestions in this thread/issue that may help: wkhtmltopdf/wkhtmltopdf#45

A bit late to this thread, but for others stumbling in here via Google, this seems to be an issue with Heroku's heroku-18 stack and wkhtmltopdf. Reverting to heroku-16 solved the issue for me.

A bit late to this thread, but for others stumbling in here via Google, this seems to be an issue with Heroku's heroku-18 stack and wkhtmltopdf. Reverting to heroku-16 solved the issue for me.

Thanks for this feedback 馃檹馃徏 and your solution @SeriouslyAwesome

And for whom it may ride faster the problem here the command line

heroku stack:set heroku-16

then commit something and push again to heroku...
more about your stack
keroku doc

Was this page helpful?
0 / 5 - 0 ratings

Related issues

VladFarion picture VladFarion  路  4Comments

supriyas12 picture supriyas12  路  4Comments

dgdosen picture dgdosen  路  5Comments

amerritt14 picture amerritt14  路  4Comments

kavitakanojiya picture kavitakanojiya  路  5Comments