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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: satheeshpro at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sun Jan 05 05:01:28 2025 UTC