From:             [EMAIL PROTECTED]
Operating system: Windows 98
PHP version:      4.2.3
PHP Bug Type:     Unknown/Other Function
Bug description:  Printer error after several pages print

I print various letters and various forms every day using PHP.  However,
when I want to print a mass mailing of 200 letters to different people,
php will error out after printing approximately 20 pages.  It seems that
the amount of pages that print is directly proportionate to the amount of
fill (verbage) placed on a page.

Warning: couldn't start a new page in C:\apache\htdocs\print\print_td.php
on line 20

Warning: couldn't end the page in C:\apache\htdocs\print\print_td.php on
line 87

Warning: couldn't start a new page in C:\apache\htdocs\print\print_td.php
on line 20

Warning: couldn't end the page in C:\apache\htdocs\print\print_td.php on
line 87


Warning: couldn't allocate new print job in
C:\apache\htdocs\print\print_td.php on line 19

Warning: couldn't end the page in C:\apache\htdocs\print\print_td.php on
line 87

Fatal error: couldn't terminate print job in
C:\apache\htdocs\print\print_td.php on line 88

Below is a snip-it of just printing out a heading over and over again
which seems to error the same way as my letters do.... 

I tried printing to a Novell que, and directly to an LPT1 and get the same
results.

#############################3
$p='printer name';
$copies = 100;
while($copies > 0) {
$handle = printer_open("$p");
printer_start_doc($handle);
printer_start_page($handle);

##################################################### FONT
$font = printer_create_font("Times New Roman", 200, 85, PRINTER_FW_BOLD,
false, false, false, 0);
printer_select_font($handle, $font);
printer_draw_text($handle, "XXXX College", 400, 130);
printer_delete_font($font);
                
$font = printer_create_font("Arial", 72, 35, PRINTER_FW_LIGHT, false,
false, false, 0);
printer_select_font($handle, $font);
printer_draw_text($handle, "XXXX W. Wilson Ave.       Chicago, Illinois  
60640", 400, 300);
printer_delete_font($font);
                
$font = printer_create_font("Arial", 72, 30, PRINTER_FW_NORMAL, false,
false, false, 0);
printer_select_font($handle, $font);
printer_draw_text($handle, "www.XXXcollege.net", 3800, 300);
printer_delete_font($font);
####################################################
##################################################### LINE DRAW
$pen = printer_create_pen(PRINTER_PEN_SOLID, 3, "000000");
printer_select_pen($handle, $pen);
printer_draw_line($handle, 30, 380, 5000, 380);
printer_delete_pen($pen);
####################################################
$font = printer_create_font("Arial", 72, 36, PRINTER_FW_MEDIUM, false,
false, false, 0);
printer_select_font($handle, $font);
printer_draw_text($handle, "Office of Financial Aid", 400, 400);
printer_draw_text($handle, "773 907- XXXX", 1590, 400);
printer_draw_text($handle, "[EMAIL PROTECTED]", 3800, 400);
printer_delete_font($font);
#####################################################

######################################################### #NAME AND
ADDRESS AND BODY OF LETTER WOULD PRINT HERE
########################################### STUDENT ID

printer_end_page($handle);
printer_end_doc($handle);
printer_close($handle);

$copies = $copies - 1;
}  // END WHILE COUNT
################################### END ROUTINE

Any consideration to my problem will be greatly appreciated.
-- 
Edit bug report at http://bugs.php.net/?id=19927&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=19927&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=19927&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=19927&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=19927&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=19927&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=19927&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=19927&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=19927&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=19927&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=19927&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=19927&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=19927&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=19927&r=isapi

Reply via email to