1

Hi,

I need to embed a font in the PDF produced by HTML2PDF. I've used the font conversion tool directly in the PDF, but Acrobat Reader display its alternative font as the font is not embedded within the document.

I'm using HTML2PDF v4.03 - 27/05/2011 and I need a solution to use our corporate font. Arial is not an option.

After some investigation, this is what I'v tried to do:
- file /_class/tcpdfConfig.php: added <? define('FONT_EMBEDDING_MODE', 'all'); ?>
- and the call for the HTML2PDF function:

$html2pdf = new HTML2PDF('P', array($largeur,$hauteur), 'fr', false, 'ISO-8859-1', 0);
$html2pdf->AddFont('universltstd-boldcn', '', '/layout/html2pdf/_tcpdf_5.0.002/fonts/universltstd-boldcn.php');
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
$html2pdf->Output("uploads/pdf/document.pdf",'F');

A big thank to anyone able to help.