This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I don't think that there is anyway to do this within a servlet as the rendering of the HTML is performed by the client's browser. The width of a field or portion of text is determined by all sorts of variables such as the fonts that are actually installed on the clients PC, the preferred text size set by the user etc... This information is not passed to the servlet at all therefore the width cannot be determined. Sorry I can't provide a solution
Andy Bowes<br />SCJP, SCWCD<br />I like deadlines, I love the whoosing noise they make as they go flying past - Douglas Adams
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com