|  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
 [2006-05-24 19:28 UTC] satheeshpro at gmail dot com
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:
$pdf = pdf_new();
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);
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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-05-24 21:15 UTC]
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-2020 The PHP Group
All rights reserved.
Last updated: Sun Jul 12 07:01:25 2020 UTC