我正在使用DOM PDF 0.6.0 Beta 2.我想在PDF文件中使用自定义字体(字体:“Segeo Print”,“Lucida手写”,“夜空中的飞机”).
但我不能在我的PDF中获得期望的字体.你可以在这篇文章中找到我的代码.请让我知道如何解决这个问题.
require_once("dompdf_config.inc.php");
$html = "
*{font-size:15px;}
div.ClJ{font: nightsky;}
This text is in DIV Element
";
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$pdf = $dompdf->output();
$dompdf->stream("dompdf_out.pdf", array("Attachment" => false));
?>