note 48527 rejected from function.pdf-findfont by didou
| From: | didou@php.net | Date: | Tue, 28 Dec 2004 16:15:46 +0000 |
| Subject: | note 48527 rejected from function.pdf-findfont by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-82409@lists.php.net to get a copy of this message | ||
Note Submitter: fxmzb123 at yahoo dot co dot uk
----
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?