php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #37582 PDFlibexception
Submitted: 2006-05-24 19:28 UTC Modified: 2006-05-24 21:15 UTC
From: satheeshpro at gmail dot com Assigned:
Status: Not a bug Package: PDF related
PHP Version: 4.4.2 OS: windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
41 + 8 = ?
Subscribe to this entry?

 
 [2006-05-24 19:28 UTC] satheeshpro at gmail dot com
Description:
------------
Fatal error: Uncaught exception 'PDFlibException' with message 'Metrics data for font 'Arial' not found' in C:\wamp\www\pdf_file.php:9 Stack trace: #0 C:\wamp\www\pdf_file.php(9): pdf_findfont(Resource id #2, 'Arial', 'host', 1) #1 {main} thrown in C:\wamp\www\pdf_file.php on line 9

Reproduce code:
---------------
<?php
$pdf = pdf_new();
pdf_open_file($pdf,'c:\bennyboy.pdf');
pdf_set_info($pdf, "Author", "Ben Shepherd");
pdf_set_info($pdf, "Title", "Creating a pdf");
pdf_set_info($pdf, "Creator", "Ben Shepherd");
pdf_set_info($pdf, "Subject", "Creating a pdf");
pdf_begin_page($pdf, 595, 842);
$arial = pdf_findfont($pdf, "Arial", "host", 1);
pdf_setfont($pdf, $arial, 14);
pdf_show_xy($pdf, "<Type your info here>",50, 400);
$gif_image = pdf_open_gif($pdf, "logo_i.gif");
pdf_place_image($pdf, $gif_image, 200, 300, 1.0);
pdf_close_image($pdf, $gif_image);
pdf_end_page($pdf);
pdf_close($pdf);
echo "<A HREF=\"C:\bennyboy.pdf\" TARGET=\"_blank\">Open pdf in a new window $user</A>";
?>

Expected result:
----------------
I expect to create a pdf file successfully



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-24 21:15 UTC] tony2001@php.net
If PDFLib fails to find "metrics data for font 'Arial'", there is nothing PHP can do about it.
Please report that to PDFLib authors.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 06:01:29 2024 UTC