|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-09-23 15:31 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 18:00:01 2025 UTC |
Description: ------------ I use printer_draw_text() in a function that divides a string into multiple lines when printing. the strange thing is that some lines are not printed. The main problem is that when calling printer_draw_text() sometimes no data is printed, without any error message or warning. Reproduce code: --------------- reset($arr_words); while(list($int_key, $str_value) = each($arr_words)) { if($int_count + strlen($str_value) >= 35) { printer_draw_text($obj_printer, $str_temp, $int_x_pos_5, $int_y_pos); $int_y_pos += $int_y_step_small; $int_count = strlen($str_value) + 1; $str_temp = $str_value.' '; if($int_key == key($arr_words)) { printer_draw_text($obj_printer, $str_temp, $int_x_pos_5, $int_y_pos); } } else { $str_temp .= $str_value.' '; $int_count += (strlen($str_value) + 1); if($int_key == key($arr_words)) { printer_draw_text($obj_printer, $str_temp, $int_x_pos_5, $int_y_pos); } } } Expected result: ---------------- large string should be printed divided into strings of 35 characters max. Otherwise a new line should be started. Actual result: -------------- Not possible to show, but on printer some calls to printer_draw_text are not printed.