php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26237 No output when calling printer_draw_text()
Submitted: 2003-11-13 08:32 UTC Modified: 2005-09-23 15:31 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: friet at eten dot nl Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4CVS-2003-11-13 (stable) OS: NT4
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: friet at eten dot nl
New email:
PHP Version: OS:

 

 [2003-11-13 08:32 UTC] friet at eten dot nl
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.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-23 15:31 UTC] sniper@php.net
Report this to the pecl bug system: http://pecl.php.net/bugs/
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri Dec 05 18:00:01 2025 UTC