From:             friet at eten dot nl
Operating system: NT4
PHP version:      4CVS-2003-11-13 (stable)
PHP Bug Type:     Unknown/Other Function
Bug description:  No output when calling printer_draw_text()

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.

-- 
Edit bug report at http://bugs.php.net/?id=26237&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=26237&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=26237&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=26237&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=26237&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=26237&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=26237&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=26237&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=26237&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=26237&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=26237&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=26237&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26237&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=26237&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=26237&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=26237&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26237&r=float

Reply via email to