dompdf and adding new font - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: dompdf and adding new font (/showthread.php?tid=15475) |
dompdf and adding new font - El Forum - 02-05-2009 [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(); } } Regards |