Where does pdf_findfont finds for fonts in Windows ?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Where does pdf_findfont finds for fonts in Windows ?

Post by anjanesh »

$font = pdf_findfont($pdf, "Times New Roman", "winansi", 1);
gives
Fatal error: PDFlib error: [2516] PDF_findfont: Metrics data for font 'Times New Roman' not found in xxxx.php on line xx
I copied the times new roman font file into the dirt where the script resides but no luck. Is there any particular place for this ?
Running on Win 2K3 Server - IIS 6.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it likely needs to be somewhere in the include path. Maybe try putting it where the script is being called from, instead of where the script is stored.
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Tried : pdf_set_parameter($pdf, "resourcefile", "c:\\windows\\fonts\\times.ttf");
Still : Fatal error: PDFlib error: [2516] PDF_findfont: Metrics data for font 'Times New Roman' not found in xxx.php on line xx
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

I checked up phpinfo in my site and pdf does not exist.
How do I get it enabled my host ?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

ask them. :roll:
Post Reply