4
votes

I'm having a very annoying problem using the TCPDF PHP library with embedded fonts.

I know I'm using it the right way (like the manual says) and that the fonts are correctly embedded.

Whenever I try to read my output files on an Adobe reader it works perfectly fine.

But when I'm using non-adobe readers like the iPad's, SOME and only some fonts disappear completely.

Any suggestions on how to solve this problem or how to debug a PDF file so I have more information?

1
Even with embedding of the font, some readers just don't use the embedded font and some fonts are just not usable by certain systems. Is there any commonality between the fonts that are disappearing? Are they all TrueType or do they all come from one font family, etc.? Is there a particular subset of viewers that are running into this issue? Is there a particular device that is running into this issue? Also, what code are you actually using to embed the fonts? - Reid Johnson

1 Answers

0
votes

Use TTF fonts and add them like this:

 $neueCE55r = $pdf->addTTFfont('ttf/HelveticaNeueCE55Roman.ttf', 'TrueTypeUnicode', '', 96);
 $pdf->SetFont($neueCE55r, '', 20, '', false);

These fonts should work on all systems.