Fonts not applied in Jsreport PDF



  • In my JsReport i can't apply fonts. If i apply it was applied only on local base, once i upload in server its not working.

    I tried the example that Jsreport provide, but no use. please anyone provide working example for roboto font?

    i tried following one,
    <link href="https://fonts.googleapis.com/css?family=Roboto&display=swap" rel="stylesheet">

    in style:
    font-family: 'Roboto', sans-serif;

    and i tried upload fonts in asset also, but no use

    Asset upload format i used:

    1_1573037258315_Screenshot Capture - 2019-11-06 - 16-16-06.jpg
    0_1573037258313_Screenshot Capture - 2019-11-06 - 16-15-34.jpg


  • administrators

    hi!

    • using google fonts api: when using a remote source for the font you need to tell chrome that it should wait for external requests to be finished before trying to convert the page to pdf, you can do this by just activating the chrome checbock "wait for network iddle". an example of this is here
    • using asset: it looks like your code is wrong, you can see an example of the font working from asset here


  • hi @bjrmatos now its working fine.2nd method working, still 1st method not working. anyway thanks.


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.