Bug #14377: incorrect font id with pdf_get_value ('ascender',$fontid)
| From: | ivan dot lamouret at novitek dot fr | Date: | Fri, 07 Dec 2001 13:24:18 +0000 |
| Subject: | Bug #14377: incorrect font id with pdf_get_value ('ascender',$fontid) | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-72844@lists.php.net to get a copy of this message | ||
From: ivan.lamouret@novitek.fr
Operating system: linux suse
PHP version: 4.0.6
PHP Bug Type: PDF related
Bug description: incorrect font id with pdf_get_value ('ascender',$fontid)
pdf_get_value for font metrics keys, with font descriptor modifier does not
handle the descriptor correctly:
example code :
$pdf = pdf_new();
pdf_open_file($pdf, "");
pdf_begin_page($pdf, 595, 842);
$font = pdf_findfont($pdf, "Times-Roman", "winansi",0);
pdf_get_value($pdf,'ascender',$font);
pdf_end_page($pdf);
pdf_close($pdf);
output:
Fatal error: PDFlib error: Bad font descriptor 1 in PDF_get_value/descender
fix:
pdf_get_value($pdf,'descender',$font-1);
When several fonts are (pre-)loaded, only query to the last one fails. The
returned value for the others are probably mixed up.
PDFlib GmbH Version 4.0.1
Revision $Revision: 1.79.2.1 $
--
Edit bug report at: http://bugs.php.net/?id=14377&edit=1