Answer the question
In order to leave comments, you need to log in
How to include Calibri font in tcpdf?
Hello.
I can't figure out how to include the Calibri font in tcpdf?
Downloaded the Calibri.ttf file. I put it in a directory.
I connect like this:
require_once($_SERVER["DOCUMENT_ROOT"].'/libs/tcpdf/tcpdf.php');
$pdf = new TCPDF('P', 'mm', 'A4', true, 'UTF-8', false);
$fontname = TCPDF_FONTS::addTTFfont('/libs/tcpdf/fonts/Calibri.ttf', 'TrueTypeUnicode', '', 32);
$pdf->SetFont('Calibri', '', 9);
TCPDF ERROR: Could not include font definition file: calibri
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question