Re: PDFLIB error 2516

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Friday, November 5, 2004, 8:18:16 PM, you wrote:
JvZnc> Hi All,
JvZnc> I upgraded my test system to 4.3.9 (from 4.3.4) and now run into problems
JvZnc> with pdf creation. Scripts that ran fine before now return the following
JvZnc> error:

JvZnc> Fatal error: PDFlib error: [2516] PDF_findfont: Metrics data for font
JvZnc> 'Arial' not found in d:\website\pdf_graph.php on line 50


JvZnc> Has anybody seen this before and knows of the solution? Google returned no
JvZnc> hits that solved the problem.

JvZnc> <snip>

JvZnc> pdf_open_file($pdf, "d:\\website\\graphs.pdf");

JvZnc> pdf_set_info($pdf, "Author", "Automatically Generated");
JvZnc> pdf_set_info($pdf, "Title", "Management graphs");
JvZnc> pdf_set_info($pdf, "Creator", "Jacob A. van Zanen");
JvZnc> pdf_set_info($pdf, "Subject", "Management Graphs");



JvZnc> pdf_begin_page($pdf, 700, 600);
JvZnc> $bookmark1 = pdf_add_bookmark($pdf, "Information for machine SBPXXA1");
JvZnc> $arial = pdf_findfont($pdf, "Arial", "host", 1); pdf_setfont($pdf, $arial,
JvZnc> 12);  //-----this is line 50
JvZnc> pdf_show_xy($pdf, "1	Information for machine SBPXXA1 for $_POST[day]/
JvZnc> $_POST[month]/$_POST[year]",50, 510); 


JvZnc> </snip>



JvZnc> TiA

JvZnc> Jack van Zanen


You have to tell pdf where to find the font, I do it this way

pdf_set_parameter($pdf, "FontOutline", "Arial=/path/to/arial.ttf");

-- 
regards,
Tom

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux