I am using PDF_show_boxed() to display a string : "AMOUNTS IN US DOLLARS.AS YOU ARE ENROLLED IN THE DIRECT DEBIT PROGRAM,NO PAYMENT IS DUE AT THIS TIME" ....
The design of the document requires the width of the message box to be fixed.Hence if the string to be printed exceeds the width of the box,it has to be broken down into two separate lines and then displayed in the box like :
AMOUNTS IN US DOLLARS.AS YOU ARE ENROLLED IN THE DIRECT DEBIT PROGRAM,NO(First Line)
PAYMENT IS DUE AT THIS TIME(Second line)
Can anyone give me any idea on how to achieve this ....
Hoe do I split the original string into the required number of lines so as to fit the box width ...
And how do I evaluate the box height required to fit these multiple lines .......
Should I use two separate PDF_show_boxed() for two subsequent lines ...
$c=PDF_show_boxed($p, $msg,$xpos, $ypos,$width,$height, "left");
if($c>0)
{
PDF_show_boxed($p, $msg1,$xpos, $ypos,$width,$height, "left");
PDF_show_boxed($p, $msg2,$xpos, $ypos - $height,$width,$height, "left");
}
In that case how do I determine the $msg contents for the two functions .....
Thanking you all in advance .....