[PHPwestoz] PHP problem

Daniel Antonic daniel at dcnsolutions.net
Sun Jul 13 00:48:28 EST 2008


Ok guys, here is the problem I have.

I'm Using Apache 1.3 and PHP 5.2. I'm writing my own invoicing program, and it needs to generate PDF invoices, and save them to a file. I've got it inserting text fine, but I've got all sorts of trouble inserting pictures.

The code that I'm using is as follows:


    $pdf = pdf_new();
    pdf_open_file($pdf, $filename);
    $font = pdf_findfont($pdf, "Helvetica", "host", 0);

    pdf_begin_page($pdf, 595, 842);

//PDF_fit_image ( $pdf, "logo.gif", 10, 10, "scale 0.5" ) removed this line for script to run

    pdf_setfont($pdf, $font, 10);

    pdf_show_xy($pdf, "Invoice: " . $invoice, 350, 750);

//extra lines go in here

    pdf_end_page($pdf);
    pdf_close($pdf);   

I've used pdf_fit_image() and gotten the following error: pdf_fit_image() expects parameter 2 to be long, string given, had to remove the line for the script to run.

I'm not sure what is going wrong, any help would be great.

Kind regards, 
Daniel Antonic 
Proprietor DCN Solutions 

Mob: 0438 303 429 
Web: dcnsolutions.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.linux.org.au/pipermail/phpwestoz/attachments/20080712/2480fc1f/attachment.htm 


More information about the PHPwestoz mailing list