PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » File Formats » File_PDF » Bug #5378

setFont block the php script

Details

Submitted2005-09-13 09:10 UTC
Fromml_sergico at virgilio dot it
Assignedyunosh
StatusNo Feedback
PackageFile_PDF
PHP Version5.0.4
OSLinux
Roadmaps(Not assigned)

Comments

[2005-09-13 09:10 UTC] ml_sergico at virgilio dot it

Description:
------------
Setting the font makes the php script to block and never return.
The pdf file is not generated.
I found that the script blocks at line 2306 tring to get the font description file.
I get the following path for the @require $file
File/PDF/fonts/[...]
the currect path is PDF/fonts[...] instead
I'm not sure if this is an installation error of me or a bug.
I modified the base path and now it works fine

Test script:
---------------
<?php

$pdf = &File_PDF::factory(array('orientation' => 'L', 'unit' => 'pt', 'format' => 'A4'));
echo "pdf_descriptor: $pdf<br/>";

$pdf->open();
$pdf->addPage();

$pdf->setFont('courier', '', 12);
$pdf->text(10,10,'Testo di prova');

$pdf->setFont('times', '', 24);
$pdf->text(10,50,'Testo di prova con il font Times');

$pdf->close();
$pdf->save('/tmp/test.pdf');

echo "<b>Fine generazione pdf </b><br/>";
>