Pamy143
Joined: 17 May 2006
Posts: 91
Offline
|
Posted:
Wed Sep 26, 2007 6:25 am Post subject:
PDF Module in PHP. Getting fatal error |
|
|
Hi Everyone,
I keep getting greeted with the following error message: Why is this?/What does it mean?
Fatal error: Uncaught exception 'PDFlibException' with message 'Metrics data for font 'Arial' not found' in C:\Documents and Settings\Dale Piper\Desktop\Xampp\htdocs\pdffff.php:9 Stack trace: #0 C:\Documents and Settings\Dale Piper\Desktop\Xampp\htdocs\pdffff.php(9): pdf_findfont(Resource id #2, 'Arial', 'host', 1) #1 {main} thrown in C:\Documents and Settings\Dale Piper\Desktop\Xampp\htdocs\pdffff.php on line 9 |
|
Tod
Joined: 26 May 2004
Posts: 1101
Offline
|
Posted:
Wed Oct 03, 2007 4:34 am Post subject:
PDFLIB |
|
|
Try following code. This will generate invoice.pdf and saved in c drive of your local system
<?php
$pdf = pdf_new();
pdf_open_file($pdf,"c:\invoice.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);
$font = PDF_load_font($pdf, "Courier","iso8859-1", "");
pdf_setfont($pdf, $font, 10);
pdf_show_xy($pdf, "India", 100, 100);
pdf_end_page($pdf);
pdf_close($pdf);
?> |
|