0

I using domPDF and I' trying to add a custom font (neosans).

I use dompdf/www/fonts.php to add my font into domPDF. .ufm and .ttf files were created. I used a online convert to create .afm file and I put it in the fonts folder.

The font name is added into dompdf_font_family_cache.dist.php and dompdf_font_family_cache.php.

In CSS (<style> tag in the document) I set :

font-family: neosans;

but when I display the PDF the font is blank.

If I set Arial it's ok.

Promo
  • 707
  • 9
  • 26
  • Still having issues? You don't need the .AFM file unless you're document is encoded with Windows ANSI, which is *not* recommended. Also, the font should be automatically added to `dompdf_font_family_cache.php`, you shouldn't have to do anything manually. – BrianS Oct 14 '15 at 22:19
  • The following may help: http://stackoverflow.com/a/24517882/264628 – BrianS Oct 14 '15 at 22:20
  • Yes I tried command line without success... For the moment I put this issue on the side and I have tested wkhtmltopdf that have better output. – Promo Oct 16 '15 at 06:26
  • wkhtmltopdf and PhantomJS are both better options if you can implement them since they use a headless version of Safari. – BrianS Oct 16 '15 at 13:52

0 Answers0