PHP pdflib load font problem OS X

namaste

Registered
I've searched and have yet to find out what my problem is with this script loading a font. I've asked around on some of the php boards, but have yet to find a solution. I guess not enough people are using OS X for serving yet. If some one could shed some light on this I would really appreciate it. Here is the error message I'm receiving when using pdf_findfont().

Fatal error: PDFlib error: Resource category 'FontAFM' not found in /Users/namaste/Sites/make_pdf.php on line 9

My fonts and pdflib.upr reside in /fonts and the path variable in the pdflib.upr file is set to //fonts

My code snippet is as follows:
PHP:
$pdf = pdf_new(); 

pdf_set_parameter($pdf, "resourcefile", "/fonts"); 

pdf_open_file($pdf); 

pdf_begin_page($pdf, 252, 144); 

$pdf_font = pdf_findfont($pdf, "Helvetica", "builtin", 1); 

if ($pdf_font) 
{ 
pdf_set_font($pdf, $pdf_font, 10); 
}
This is running on MacOS 10.1.2 with the PHP build from www.entropy.ch. I know that the pdflib is at least working partially because a PDF is created if I comment out the font portion. I've tried moving the fonts folder and accompaning files below and above the www root folder with no success. I've tried defining the font location with the pdf_set_parameter as well without luck. Any Ideas?
 
Back
Top