xhtml2pdf doesn't embed Helvetica

前端 未结 1 465
一生所求
一生所求 2021-01-28 20:00

I\'m creating a PDF with xhtml2pdf using Django. I\'m sending that PDF to print, but then they say that some Fonts are not embed. I have a Helvetica font, but I didn\'t use Helv

相关标签:
1条回答
  • 2021-01-28 20:56

    Helvetica is one of the standard fonts that every PDF renderer has to have available. Therefore it doesn't have to be embedded.

    A possible solution would be to use another sans-serif font instead of Helvetica. On windows e.g. Arial. On OSX e.g. Helvetica Neue or Avenir. They look a lot like Helvetica, but are not standard PDF fonts.

    In your stylesheet, specify a new font for all elements;

    * {
        font-family: Avenir;
    }
    
    0 讨论(0)
提交回复
热议问题