rdvojmoc / DinkToPdf

C# .NET Core wrapper for wkhtmltopdf library that uses Webkit engine to convert HTML pages to PDF.
MIT License
1.09k stars 417 forks source link

Fonts working locally on Mac, locally on Windows, not on server/azure web app #87

Closed markmcgookin closed 5 years ago

markmcgookin commented 5 years ago

I've managed to get DinkToPdf generating pdfs locally (using DI in an Azure webjob), on a windows machine, and in a cloud app.

However, I reference a font (Swis721 Th BT) in my markup that isn't installed on any of these machines, so I use @font-face to add support for it. This works great on Mac, on Windows machine, but just doesn't work on the Cloud app (although the PDF is still generated)

I have tried:

  1. 'link' style sheet with font file references
  2. 'link' style sheet with embedded ttf fonts