This is how I wrap text in a PDF file built from database content...
$foo = mysql_result($results,0,"foo");
$foo = wordwrap($foo,72,"|");
$Arr = explode("|",$foo);
$i = 0;
while ($Arr[$i] != "") {
pdf_continue_text($pdf,$Arr[$i]);
$i++;
}
Someone mentioned to me (and rightfully so) that this may be flawed if you have 2 blank lines, and then more text in the variable. Use it for what you will though, you may find it (or an alteration of it) useful.