Hi EO Support,
I'm trying to get a custom font working in my ASPX page (a simple invoice). Initially I tried using @font-face like this (without installing the font on my dev machine):
Code: HTML/ASPX
@font-face
{
font-family: gotham;
src: url(http://localhost:1600/fonts/Gotham-Book.otf) format("truetype");
}
(Note: I tried different versions of the URL and all had the same result).
The ASPX renders fine with the custom font in this fashion in IE9, FF and Chrome (I had to use a WOFF font file for IE9 to work instead of an OTF).
But when I put this through EO.Pdf (both RenderHtmlToPdf and RenderUrlToPdf) I got Null Reference Exceptions.
Reading through your forum, I wasn't sure if your library supports this usage, so I installed the font on my Dev machine as per the suggestion and rebooted.
I removed the @font-face block and reference the font directly:
Code: HTML/ASPX
html, body
{
font-family: "Gotham Book";
font-size: 11pt;
/*position:relative;*/
height: 95%;
}
Note: I tried with and without the quotes.
Now the font still renders fine in all browsers (including IE9), but when I use either method in the EO.Pdf library it ends up with weird characters:
I hope you can help me out.
Regards,
Tom.