<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.3790.3959" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Ok guys, here is the problem I have.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>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.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The code that I'm using is as follows:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> $pdf =
pdf_new();<BR> pdf_open_file($pdf,
$filename);<BR> $font = pdf_findfont($pdf, "Helvetica",
"host", 0);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> pdf_begin_page($pdf, 595,
842);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>//PDF_fit_image ( $pdf, "logo.gif", 10, 10, "scale
0.5" ) removed this line for script to run</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> pdf_setfont($pdf, $font,
10);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> pdf_show_xy($pdf, "Invoice: " .
$invoice, 350, 750);</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>//extra lines go in here</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
pdf_end_page($pdf);<BR> pdf_close($pdf);
</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I've used pdf_fit_image() and gotten the following
error: </FONT><FONT face=Arial size=2>pdf_fit_image() expects parameter 2 to be
long, string given, had to remove the line for the script to run.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I'm not sure what is going wrong, any help would be
great.</FONT></DIV><FONT face=Arial size=2>
<DIV><BR><FONT face=Arial>Kind regards, <BR>Daniel Antonic <BR>Proprietor DCN
Solutions <BR><BR>Mob: 0438 303 429 <BR>Web: </FONT><A
href="http://dcnsolutions.net"><FONT
face=Arial>dcnsolutions.net</FONT></A></FONT></DIV></BODY></HTML>