I could not include an own font. If I load the pdf document, there are a message, that only the font "helvetica" existing. But the helvetica font self are not included in the pdf document. Whats wrong. Could you help me?
Here are my directory structure:
fonts/PT_Sans-Web-Regular.php
fonts/PT_Sans-Web-Regular.z
files/test.php
files/test.dat
html2pdf/.....
Here ist my code:
test.php>
<?php
date_default_timezone_set('Europe/Berlin');
ob_start();
readfile("test.dat");
$content = ob_get_clean();
require_once(dirname(__FILE__).'/../html2pdf/html2pdf.class.php');
try
{
$oben=3; //mT
$unten=0; //mB
$links=0; //mL
$rechts=0; //mR
$html2pdf = new HTML2PDF('P','A4','de', false, 'ISO-8859-15', array($links, $oben, $rechts, $unten));
$html2pdf->pdf->SetDisplayMode('fullpage');
$html2pdf->addFont('intern', '', dirname(__FILE__).'/../fonts/PT_Sans-Web-Regular.php');
$html2pdf->setDefaultFont('intern');
$html2pdf->writeHTML($content, isset($_GET['vuehtml']));
$html2pdf->Output('test.pdf', 'F');
}
catch(HTML2PDF_exception $export) {
echo $export;
exit;
}
?
test.dat
Attention,
<br>
<br>
this is a test.