|
我想用php制作pdf,我的程序是
$pdf = pdf_new();
pdf_open_file($pdf, "pdftest.pdf");
pdf_begin_page($pdf, 595, 842);
$arial = pdf_findfont($pdf, "arial", "host", 1);
pdf_setfont($pdf, $arial, 10);
pdf_show_xy($pdf, "this is an exam of pdf documents, it is a good lib,",50, 750);
pdf_show_xy($pdf, "if you like,please try yourself!", 50, 730);
pdf_end_page($pdf);
pdf_close($pdf);
运行就报错
Fatal error: Uncaught exception 'PDFlibException' with message 'Metrics data for font 'arial' not found' in C:\xampp\htdocs\test\test_pdf.php:9 Stack trace: #0 C:\xampp\htdocs\test\test_pdf.php(9): pdf_findfont() #1 {main} thrown in C:\xampp\htdocs\test\test_pdf.php on line 9
我该怎么办呀!!!99 |
|