note 48527 added to function.pdf-findfont
| From: | fxmzb123 at yahoo dot co dot uk | Date: | Tue, 28 Dec 2004 12:42:48 +0000 |
| Subject: | note 48527 added to function.pdf-findfont | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-82401@lists.php.net to get a copy of this message | ||
Hello
I enounter a problem:
Fatal error: PDFlib error: [1016] PDF_findfont: Couldn't open UPR file
'/fonts/pdflib.upr' for reading (file not found) in c:\program files\apache
group\apache\htdocs\tm\pdf.php on line 14
Here is the souce code:
<?php
$pdf = pdf_new();
pdf_open_file($pdf,"test.pdf");
pdf_set_info($pdf,"Author","Uwe Steinmann");
pdf_set_info($pdf,"Title","Test for PHP wrapper of PDFlib 2.0");
pdf_set_info($pdf,"Creator","See Author");
pdf_set_info($pdf,"Subject","Testing");
pdf_begin_page($pdf,595,842);
pdf_add_outline($pdf,"Page 1");
//problem may be is here
pdf_set_parameter($pdf, "resourcefile", "/fonts/pdflib.upr");
$font = pdf_findfont($pdf,"Arial","host",1);
pdf_setfont($pdf,$font,10);
pdf_set_value($pdf,"textrendering",1);
pdf_show_xy($pdf,"Times Roman outlined", 50,750);
pdf_moveto($pdf,50,740);
pdf_lineto($pdf,330,740);
pdf_stroke($pdf);
pdf_close($pdf);
pdf_delete($pdf);
?>
I have put /fonts/pdflib.upr in "fonts" folder, but the error message told me PHP still
can't find where the pdflib.upr.
What should I do?
----
Manual Page -- http://www.php.net/manual/en/function.pdf-findfont.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+48527
Delete -- http://master.php.net/manage/user-notes.php?action=delete+48527&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+48527&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+48527&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+48527&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+48527&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+48527&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+48527&report=yes
Search -- http://master.php.net/manage/user-notes.php