HTML to PDF font (Nunito) or style not displayed correctly
If your PDF is not displaying fonts or styles correctly when converted using HTML to PDF or URL to PDF, please try the steps below:
- Open your HTML file in Google Chrome.
- Enable Developer Console - select Developer Tools -> Console or press Ctrl + Shift + J.
- Check the
@import
clause.
You will see that the @import
clause failed with error 400 (bad request). There is a syntax error in the URL that google cannot correctly parse.
The following expression works fine in HTML and in conversion to PDF:
@import url('https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200;0,800;1,400;1,700&display=swap');