hi
i need a solution to do a wordwrap but not in the usual sense of displaying to the screen but actually printing to the printer using PHPs lesser known printer function.
the problem im having is to get a value which contains each line of the text when word wrapped and then pass it (in each line instance) to the printer_draw_text function which takes a text variable as an argument and some coordinates on where to display the text. this leads me on to the next problem i need to do this so the y co ordinates are incremented for every new line output since as i said earleier each variable is explicitly printed using the printer_draw_text which takes x and y co-ordinates.
to explain more easilt let me give an example of what i would like to do ....
$text = " one two three four";
maybe loop through the string and assign every n number of words to a temp variable $temp.
then printer_draw_text($handle, $temp, 10,10);
this is done for however many lines is required or however many times the loop is done through the string.
so upon printing out the paper will read...
one two
three four
get it??
i know it sounds easy but i think this ones a bit tricky maybe pros out there can help me here.
cheers