img; // Alignment for anchor points to use $palign = array('left','center','right'); $n = count($palign); $t = new Text($txt); $y = $ym; for( $i=0; $i < $n; ++$i ) { $x = $xm + $i*$tw; $t->SetColor('black'); $t->SetAlign('left','top'); $t->SetFont(FF_ARIAL,FS_NORMAL,11); $t->SetBox(); $t->SetParagraphAlign($palign[$i]); $t->Stroke($img, $x,$y); $img->SetColor('black'); $img->SetFont(FF_FONT1,FS_BOLD); $img->SetTextAlign('center','top'); $img->StrokeText($x+140,$y+160,'"'.$palign[$i].'"'.' pargraph align'); } // .. and send back to browser $g->Stroke(); ?>