PHP 7 TFPDF Add UTF-8 Fonts Inside PDF Document



define("_SYSTEM_TTFONTS", "../fonts");


$pdf = new tFPDF();

// Add a Unicode font (uses UTF-8)

// Load a UTF-8 string from a file and print it
$txt = 'HelloWorld.txt';

// Select a standard font (uses windows-1252)
$pdf->Write(5,'The file size of this PDF is only 13 KB.');


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.