0

Im scripting to generate a PDF file using TCPDF library, all I want now is to add font files into the document, I could add them using "SetFont" like

$pdf->SetFont('myfont', '', 10);

and its when I execute this script, the document in browser is rendering fonts perfectly, if I save it and open in another machine then fonts are working with, default fallback font is applying. I did check it by going to File->Properties->Fonts in Adobe reader, font file is listed there, but text is missing the font. Any idea will be helpful.

Peterson Andrew
  • 243
  • 6
  • 16
  • How are you adding the font files to the script? See: http://stackoverflow.com/questions/5263588/how-to-implement-custom-fonts-in-tcpdf – Robert Feb 28 '14 at 11:30

1 Answers1

0

You will probably want to embed the font using $pdf->AddFont().

A longer description of the differences between SetFont(), AddFont() and AddTTFFont() here:

TCPDF, "Could not include font definition file" with OpenType fonts

Community
  • 1
  • 1
JamesG
  • 4,288
  • 2
  • 31
  • 36