This is an archived forum post. The information may be outdated. Contact us if you have any questions.

Font Issues

thenissengroup wrote on 2013-10-11:
Hi, when we run the OUTPUT.HTML file through your website, we get the file OUTPUT.HTML.PDF, and it looks perfect. However, on our own server using the HTML to PDF API, we send the contents of the OUTPUT.HTML file via PHP to PdfCrowd, and the resulting pdf called PRODUCT-XXXX.PDF always has issues with font spacing issues - note the "IE10"............could you please help?

What is the difference between your hosted version and the PHP/API version that we are using???

support wrote on 2013-10-14:

Could you please post here your PHP code where you call the API?

I tried this and the result seems to be correct (see the attached file)
require 'pdfcrowd.php';
$client = new Pdfcrowd("**", "**");
$fd = fopen("from_file.pdf", 'wb');
$client->convertFile('output.html', $fd);
thenissengroup wrote on 2013-10-14:
Hello, I did not build this code, but you can see the PDFcrowd entry on lines 349+.....thank you very much.
support wrote on 2013-10-15:

I used your code to generate PDF and the result seems to be correct (see the attachment). I noticed that your code manipulates with HTML before it is passed to the API. Please could you double-check that the HTML passed to the API and the one you attached above are really the same?
thenissengroup wrote on 2013-10-16:
I did double-check, and ensured that everything is now using the same HTML file for generation - it's much better, but I noticed that the API version is still a bit off. Do I need to have UFM font files loaded on my server? How does your software handle fonts and UFM you use a specific provider? (Like Google Fonts)

support wrote on 2013-10-16:

You can use the CSS3 @font-face rule to use custom fonts. Pdfcrowd supports Google Fonts as well:
   <link href='' rel='stylesheet' type='text/css'>
 <body style="font-family: 'Devonshire', cursive;">
  This text is rendered with Devonshire.