weasyprint with django renders digits as images

Viewed 370

I'm trying to print an invoice using python-django 3.0.5 and django-weasyprint 1.0.1, using the base method described here.

Both my static files and my stylesheets are loaded correctly. Returning my generated html string as normal django HttpResponse works fine.

However, rendering my content to PDF always renders every digit as low-res image like below: pdf excerpt

The numbers are generated as regular text, I would expect them to be rendered as regular text using the same font as the letters around them. Did I miss a setting? Or is this a bug?

1 Answers

Change the font in your pdf stylesheet, more specifically the font-family. People have had issues with fonts like Apple Color Emoji as well as Segoe UI Emojii if they are included.

Related