We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Converting HTML to PDF Custom fonts not working

Hi I am trying to convert html to  pdf everthing works fine but when try to use some custom font it is not working. Fonts are uploaded on docker container and using font urls in html-css like this:

* {

    margin: 0;

    padding: 0;

    font-size: 97% !important;

    box-sizing: border-box;

    -webkit-box-sizing: border-box;

    font-family: 'Times New Roman', Arial,sans-serif;


  @font-face {

    font-family: 'NeufileGrotesk';

    src: url('NeufileGrotesk-Regular.ttf'),



here is the font path on docker container:

Also followed this example:

1 Reply

SN Santhiya Narayanan Syncfusion Team May 4, 2023 03:35 PM UTC

We have checked the reported issue with provided details but it is working properly on our end. We have attached the sample and output for your reference. So please try the sample on your end and let us know the result.

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/DockerTest-920554139

If still you have facing any issue, we request you to share the modified sample, input file, fonts, dockerfile, product version to check this on our end. So that it will be helpful for us to analyze and assist you further on this.

Live Chat Icon For mobile
Up arrow icon