I ran into a problem that is the #pageHeader didn't use the custom font i assigned it in the internal css
but the font does work on the body
the CSS :
`
@font-face {
font-family: Helvitica;
src: url(fonts/Helvetica.ttf);
}
font-family: Helvetica;
vertical-align: middle;
text-align: center;
}
`
lastly are there any function that will send some kind of alert to the user when the pdf rendering is complete
Thanks in advance
I'm also stuck on this, did you figure anything out @tsp1996 ?
@mischa-saunders
Its a bit messy, but it works
Basically my solution was to put in a seperate internal and in-line CSS for the header
<style>
@font-face{
font-family:Customfont;
src:url(file:///C:/fonts/customfont.ttf);
}
</style>
<div id="header" style="font-family:Customfont;">
Header Contents
</div>
you can also expose the font via public endpoint, and use that:
src: url('http://localhost:9003/public/customfont.ttf');
Images can only be loaded via HTTP, now the fonts needed to be loaded locally. SMH.
Same issue here, font-family in pageHeader is not applied...
How couldi add custom font-family and custom font-size on pageHeader ?
Most helpful comment
@mischa-saunders
Its a bit messy, but it works
Basically my solution was to put in a seperate internal and in-line CSS for the header