Thread: Create pdf
View Single Post
Old 09-11-2009, 02:12 PM   #2 (permalink)
Randy
The Acquainted
 
Randy's Avatar
 
Join Date: May 2007
Location: Your G/F's Closet
Posts: 114
Thanks: 7
Randy is on a distinguished road
Default

Now i am not the best coder myself so I may be wrong if so somebody else please correct me but im going to do my best here.

Looking at the error its the font that is missing meaning that the script is unable to find the fonts that you listed here:

PHP Code:
$arial=pdf_findfont($pdf,'Arial','host',1); 
For font be sure to have something included like this:

PHP Code:
// Locate Font Directory
$fontdir "C:\WINDOWS\Fonts";
// Font Name Parameters
pdf_set_parameter($pdf"FontOutline""arialMyName=$fontdir\arial.ttf");
// Find Font
$arial PDF_findfont($pdf,"arialMyName","host",);
// Set font size and font name
pdf_setfont($pdf$arial10); 
Note: Credit for my given code goes to the php manual located here.

Cheers,
Randy
__________________
Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25 - Andrew Rutherford

Last edited by Randy : 09-11-2009 at 02:15 PM. Reason: Added php.net credit
Send a message via AIM to Randy Send a message via MSN to Randy
Randy is offline  
Reply With Quote
The Following User Says Thank You to Randy For This Useful Post:
dhaval (09-11-2009)