|
Posted by Steve on 10/09/07 20:53
"Good Man" <heyho@letsgo.com> wrote in message
news:Xns99C4A757DD1BFsonicyouth@216.196.97.131...
> "Steve" <no.one@example.com> wrote in news:cpROi.110$OQ.60@newsfe03.lga:
>
>> been gleening the user docs for fpdf. there's one simple example for
>> using the image function. i can't seem to get it to work. has anyone
>> else had problems with this, and if so, what did you do to diagnose
>> and fix the problem?
>>
>> tia,
>>
>> me
>>
>>
>
> i've used FPDF and image() successfully... what problems are you having?
i just get a blank space where an image should be. there are no errors that
indicate my path is wrong...or anything else. i just get a blank space.
here's my test code:
<?
header('content-type: application/pdf');
require_once 'table.pdf.class.php'; // test class to ease table creating
// only calls cell() in fpdf but in a
way
// that make it more html-like in
creation
$imagePath = 'c:/inetpub/wwwroot/toyotaii/images/';
$pdf = new pdfTable();
$pdf->addPage();
$pdf->setFont('Arial', '', 8);
$image = $pdf->image($imagePath . 'tccc.logo.jpg', $pdf->getX(),
$pdf->getY());
$pdf->ln();
$header = array('Country', 'Capital', 'Area (sq km)', 'Pop.
(thousands)');
$data = $pdf->loadData('countries.txt');
$pdf->table($header, $data);
$pdf->output();
?>
i did refactor the fpdf class so that all is camel-cased which is our bp for
this customer. however, i tested everything before, during, and after
refactoring to make sure nothing got messed up. at no time did i get an
image.
it's probably just me, but i really didn't find much about using the image
function other than a one line example.
whatever light you can shed will help greatly.
thanks,
me
Navigation:
[Reply to this message]
|