marmachineLe 18/04/2011 à 16:54
Thanks Spipu,
Still getting the same error... just hardcoded 'freeserif' for testing, though the variable $font exsists with value freeserif
i've set (for testing) the PAGE tag like:
<page backtop="<?php echo $bodyT.'mm'; ?>" backbottom="<?php echo $bodyB.'mm'; ?>" backleft="<?php echo $bodyL.'mm'; ?>" backright="<?php echo $bodyR.'mm'; ?>" backimg="<?php echo $imgURL; ?>" backimgx="<?php echo $imgXpos; ?>" backimgy="<?php echo $imgYpos; ?>" backimgw="<?php echo $imgW; ?>" style="font-size: <?php echo $fontsize."pt"; ?>; font-family: freeserif; " >
<?php // instead of the above font-family, use: if ($font) { echo "font-family: ".$font.";"; } ?>
if ($font) {
$html2pdf->pdf->setDefaultFont('freeserif');
// instead of the above function use: $html2pdf->pdf->setDefaultFont($font);
}