Custom Fonts in HTML to PDF

IronPDF's pixel-perfect rendering of PDF documents from HTML documents also includes the accurate rendering of custom web fonts, including font icons provided by libraries such as Font Awesome and Bootstrap.

IronPDF supports custom WOFF and SVG CSS font packages. This includes custom web fonts provided by online type foundries such as Google Fonts.

To convert a web page containing one or more custom fonts into PDF properly, developers must set a PDF rendering delay on IronPDF's HTML-to-PDF rendering engine. To do this, set the renderDelay property of a ChromePdfRenderOptions instance to a proper value using its setRenderDelay method, as shown in the example above. A minimum value of 500 milliseconds (or half a second), will suffice in most cases in ensuring that all custom font/icon assets fully load before IronPDF converts all of the web page content into a PDF. 

Please note, however, that web fonts do not work on Windows Apps hosted by Azure due to security reasons.