Welcome Guest, Not a member yet? Register   Sign In
dompdf and adding new font
#1

[eluser]Mitja B.[/eluser]
I want to add a new font to dompdf but i do not know how. I can not find any docs for this. I also want to change font to Times New Roman but i also did not find any docs how to make this. In home page said PDFs include support by default for Helvetica, Times-Roman, Courier and ZapfDingbats but nothing how to use each one.

This is my code, can someone tell me how to add font in it?


function pdf_create($html, $filename, $stream=TRUE)
{
require_once("dompdf/dompdf_config.inc.php");

$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
if ($stream) {
$dompdf->stream($filename.".pdf");
} else {
write_file("./invoices_temp/invoice_$filename.pdf", $dompdf->output()Wink;
}
}


Regards




Theme © iAndrew 2016 - Forum software by © MyBB