i have started with something as follows ....
function new_line($text,$limit, $x, $y) {
$word = strtok($text,' ');
while ($word) {
if (strlen($line.$word) > $limit) {
$string .= "$line";
$line = '';
$y += 100;
} // end if
$line .= ' '.$word;
$word = strtok(' ');
} // end while
if (!empty($line)) $string .= $line;
// return $string;
// printer_drawtext($string, $x, $y);
printer_draw_text($handle, $string, $x, $y);
but its flawed
it prints like .....
one two three
one two three four five
one two three four five six
instead of one two three four
five six
etc
please see if you can do anything
y is the vertical cordinate so we can leave that alone.
thanks