Hey all,
I've managed to get embedding of a local font via @font-face working (data-uri base64 encoded since url(file:///x.ttf) doesn't seem to work.)
Now, my problem is:
With the following HTML:
Code: HTML/ASPX
<head>
<style type="text/css">
@font-face
{
font-family: Proxima;
src: url(data:font/truetype;charset=utf-8;base64,{{SNIPPEDOUT BASE64 ENCODED ttf-content}});
}
html, body {
font-family: Proxima;
}
</style>
</head>
<html>
<body>
<h1>TEst</h1>
</body>
</html>
The rendered H1 has the correct font.
However when I add:
Code: C#
var options = new HtmlToPdfOptions();
options.HeaderHtmlFormat = $"<span style=\"font-family: Proxima;\">Text</span>";
And use that, the header text does not get the correct font.
Am I missing something on how fonts get embedded, or do I have to do the page headers manually?
I will also have the same problem for page numbers since we need to add them after we have rendered it, since we don't know how many pages we will get...
Thankful for any hints I can get!