New topic Closed topic
avatar image
1
PDF, PrinceXML and Fonts
By Created , last editted

Hi,


I like to use a particular font when generating a PDF. The font is Calibri. When I use the following CSS at an endpoint, it will give me all the text with Calibri as font. But not in the PDF.


body {
font-family: Calibri;
font-style: normal;
font-variant: normal;
}


Also uploading the font file as Betty public file and adding this to the CSS does not help:


@font-face {
font-family: Calibri;
font-style: normal;
font-variant: normal;
src: local("{% file_asset_url 'calibri.ttf' %}");  /* complete URL doe not make a difference */
}


How can you get this to work with PrinceXML and Betty?


Hi,


I like to use a particular font when generating a PDF. The font is Calibri. When I use the following CSS at an endpoint, it will give me all the text with Calibri as font. But not in the PDF.


body {
font-family: Calibri;
font-style: normal;
font-variant: normal;
}


Also uploading the font file as Betty public file and adding this to the CSS does not help:


@font-face {
font-family: Calibri;
font-style: normal;
font-variant: normal;
src: local("{% file_asset_url 'calibri.ttf' %}");  /* complete URL doe not make a difference */
}


How can you get this to work with PrinceXML and Betty?

Answers
Sort by:

This topic is closed.