I am facing a problem here.
I am writing a script which will produce HTML output for printing.
I want to introduce "page-break" after a specified "Content-Length" and then it continues printing the remaining input. Lets suppose after EVERY 130 characters, how can I insert <DIV style="page-break-after:always"></DIV>
and then continue printing the remaining part? I tried to use 'while' statement but could not think of any good solution. Thanks in advance for any help. Sara. ################### CODE #######################
$text = qq|
This is line no 1 and then it continues ..... and then a line break
This is line no 2 and then it continues ..... and then a line break
This is line no 3 and this is a long line and then it continues ..... and then a line break
This is line no 4 and then it continues ..... and then a line break
|;
$length = length ($text);
print qq|
<div align="center">
<center>
<table>
<tr>
<td width="500" style="text-align: Justify" valign="middle" align="right">
$text
</td>
</tr>
</table>
</center>
</div>
|;
I am writing a script which will produce HTML output for printing.
I want to introduce "page-break" after a specified "Content-Length" and then it continues printing the remaining input. Lets suppose after EVERY 130 characters, how can I insert <DIV style="page-break-after:always"></DIV>
and then continue printing the remaining part? I tried to use 'while' statement but could not think of any good solution. Thanks in advance for any help. Sara. ################### CODE #######################
$text = qq|
This is line no 1 and then it continues ..... and then a line break
This is line no 2 and then it continues ..... and then a line break
This is line no 3 and this is a long line and then it continues ..... and then a line break
This is line no 4 and then it continues ..... and then a line break
|;
$length = length ($text);
print qq|
<div align="center">
<center>
<table>
<tr>
<td width="500" style="text-align: Justify" valign="middle" align="right">
$text
</td>
</tr>
</table>
</center>
</div>
|;