Dear ...

I would like to find out how can I code the following code in iText to
produce a PDF file?

<html>
<head>
<title>Scriptlet</title>
</head>
<body>
<%!
        /**getRandom Color function returns a hexadecimal color**/
String getRandomColor () {
        int red, green , blue;
        red = (int)(Math.random() * 255);
        green = (int)(Math.random() * 255);
        blue = (int)(Math.random() * 255);
String ret = Integer.toHexString(red) + Integer.toHexString(green) +
Integer.toHexString(blue);
        return ret.toUpperCase();
}
%>
This page iterates through a counter and writes the results to the screen.
<table border="1" width="100%">
<% for (int count = 0; count < 10; count++) { %>
<tr>
<td align="center" bgcolor="#<%= getRandomColor() %>"><b>Count = <%= count
%></b></td>
</tr>
<% } %>
</table>
</body>
</html>
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.516 / Virus Database: 269.21.1/1300 - Release Date: 26/02/2008
19:50


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to