I have script that generates a pdf width some text and two images in it. One
of the images is just a header and works fine. The other is a photo, now,
this sometimes works and sometimes doesn't.  I can't figure out why.

When the photo doesn't appear I eventually get a box saying something like
"An I/O processing error occured". Sorry, can't remember the exact message,
and as I write this message I can't seem to get it back. Also, when you
print one of the broken PDF's it locks up the browser (works fine on the
non-broken ones).

Here is the script I use to send the generated PDF to the browser:

<?

    if(file_exists("/path/to/file/photo.gif")) {
        $pic = pdf_open_image_file($pdf, "gif", "/path/to/file/photo.gif");
        pdf_place_image($pdf, $pic, 38, 450, 1.5);
    }

    ....
    ....
    ....

    pdf_show_boxed($pdf, "$rcpt_name\n$address\n\nInvoice no:
$invoice_no\nDue Date: $rowdata[duewhen]\n\nNet Price: \$$netprice\nGST:
\$$gst\n\nTotal to pay: \$$total", 380, 10, 200, 150, "right");

    pdf_end_page($pdf);
    pdf_close($pdf);
    fclose($fp);

    header( "Content-type: application/x-pdf" );
    header( "Content-Disposition: filename=$REMOTE_USER.$id.pdf" );
    header( "Content-Description: PDF Format Invoice" );
    header("Location: /invoicing/$REMOTE_USER.$id.pdf");

?>


Anyhelp would be muchly appreciated.

Cheers

PS, Its all in IE5.x in win98/win2k

Philip Murray
[EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to