Re: working with a pdf file and a mysql query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/22/07, Mike Ryan <miker@xxxxxxxxxxxxxx> wrote:
I have created a pdf form with php that prints out one record using
php_show_xy statements but when I try to print out a query with multiple
lines of data I get an error that reads

Fatal error: Uncaught exception 'PDFlibException' with message 'Function
must not be called in 'object' scope' in C:\xampp\htdocs\payment\html\php
code\dayrpt.php:60 Stack trace: #0 C:\xampp\htdocs\payment\html\php
code\dayrpt.php(60): pdf_show_xy() #1 {main} thrown in
C:\xampp\htdocs\payment\html\php code\dayrpt.php on line 60


This is the code I am trying, it works with just 1 item to return but not
with 2 or more items, to use any suggestions would be helpful.

$linenum = '600';
 while ($row = mysql_fetch_assoc($result)) {
 PDF_show_xy($pdf, $row['patname'] ,80,$linenum);
 PDF_show_xy($pdf, $row['pmtdate'] , 225, $linenum);
 PDF_show_xy($pdf, $row['checkamt'], 300,$linenum);
 PDF_show_xy($pdf, $row['cashamt'], 375,$linenum);
 Pdf_show_xy($pdf, $row['ccamt'], 450, $linenum);
 $total = $row['checkamt'] + $row['cashamt'] + $row['ccamt'];
 PDF_show_xy($pdf, $total,525,$linenum);
 $linenum = $linenum - '10';
}


Did you check for the return values of those PDF_show_xy functions?
You should check if they were succesfull or not

Tijnema

--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux