Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deformed font rendering on Heroku #702

Open
douglasep opened this issue Oct 31, 2017 · 4 comments
Open

Deformed font rendering on Heroku #702

douglasep opened this issue Oct 31, 2017 · 4 comments

Comments

@douglasep
Copy link

douglasep commented Oct 31, 2017

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

@douglasep douglasep changed the title WickedPDF on Heroku Error Rendering PDF on Heroku Nov 1, 2017
@douglasep
Copy link
Author

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

@unixmonkey unixmonkey changed the title Error Rendering PDF on Heroku Deformed font rendering on Heroku Dec 13, 2017
@unixmonkey
Copy link
Collaborator

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

@SeriouslyAwesome
Copy link

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.

@v2lrf
Copy link

v2lrf commented Mar 17, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants