Search code examples
c#asp.netsyncfusionej2-syncfusion

Syncfusion : Using a Google Font for the page number in html to pdf


I'm using Syncfusion's HTML to PDF which is working great!

Little hiccup though, all their documentation shows if you want to change the font of the page numbers at the bottom you have two choices:

  1. standard font:

    PdfFont font = new PdfStandardFont(PdfFontFamily.Helvetica, 12f)

  2. custom font:

    PdfFont font = new PdfTrueTypeFont(Server.MapPath("/App_Data/ARIALUNI.ttf"), 24)

But I need to allow a font from google fonts. I have the font loaded in my html but the page numbers are painted after so I'm not sure how to 1. embed it & 2. set it.

Appreciate any help. Many thanks


Solution

  • For anyone that comes across this rare ask, it's not supported. You need to load and store the TrueType font and then set it to the file location as above.