I'm using Winnovative's Html to PDF converter to print my page to PDF.
// Get a PDF of the URL.
Document document = new Document();
//document.LicenseKey = PDFUtility.LicenseKey;
PdfPage page = document.Pages.AddNewPage(PdfPageSize.A4, new Margins(10, 10, 0, 0), PdfPageOrientation.Portrait);
HtmlToPdfElement pageToPrint = new HtmlToPdfElement(sURL);
page.AddElement(pageToPrint);
// Setup response
context.Response.ContentType = "application/pdf";
context.Response.AddHeader("Content-Disposition", string.Format("attachment; filename ={0}", sPage + ".pdf"));
document.Save(context.Response.OutputStream);
My header tags have a font face on them. This works fine locally and renders with the custom font. However on my dev and test servers it does not render the header tags at all. It does leave space where the header tags should be.
When we changed our headers to Arial the PDF renders with the headers in all environments.
We've checked permission on the font files (set permissions to full control for everyone). That didn't change anything.
Something to do with the font face is not working on our server and we can't figure out what.
You have to check if your font files are accessible in a browser from the server itself. Put your HTML code in a HTML file and open that file from the test server in a browser. If the HTML file is displayed well in browser it should be rendered well in PDF too.
You should also make sure that the IIS from the server has the ttf or woff (not sure what exactly you reference in @font-face) set in accepted MIME types, otherwise these files will not be served by web server.