alvarcarto / url-to-pdf-api

Web page PDF/PNG rendering done right. Self-hosted service for rendering receipts, invoices, or any content.
MIT License
7.01k stars 774 forks source link

All fonts are not rendered correctly in Heroku #5

Closed kimmobrunfeldt closed 6 years ago

kimmobrunfeldt commented 6 years ago

E.g. Helvetica Neue is not rendered on Heroku. Url: https://url-to-pdf-api.herokuapp.com/api/render?url=https://github.com/kimmobrunfeldt/url-to-pdf-api/issues/5

My macbook:

screenshot 2017-10-04 01 05 44

macbook.pdf

Heroku:

screenshot 2017-10-04 01 05 58

heroku.pdf

riston commented 6 years ago

There will be always some difference between "your" pc and the rendering machine, depends on what you use Windows, Linux, OSX etc. The system font base will be always different, you can include some fonts with some custom font buildbacks, but be aware that the Heroku slug size is limited to ~300MB.

Some random example https://github.com/debitoor/heroku-buildpack-converter-fonts.

kimmobrunfeldt commented 6 years ago

@riston Yeah definitely. Thanks for linking the buildpack.

I added the buildpack, but paragraphs in github at least are bolded: heroku-fonts.pdf. I'm not sure if I'll keep the font pack there.

germanger commented 3 years ago

How do you add a buildpack if the app was deployed to the dyno using Heroku Button?