2005 IR Help Posted August 26, 2006 Share Posted August 26, 2006 By: John Augusto Charnet - jcharnet Determine TextField width at design time 2004-06-17 11:14 Hello, I'm generating some dynamic reports. I'd like to know if there is a way (using Jasper, or even iText API) to determine the exact width of a text so that at design time I could set the width of my text ? I know that java.awt.Graphic has a getFontMetrics and with this class I can get the width in pixels of a determined text. Is there something similar ? Thanks a lot. Sincerely, John. Link to comment Share on other sites More sharing options...
hmorris1970 Posted November 28, 2008 Share Posted November 28, 2008 I too am in need of this information and also the height to overcome a couple of issues. First the width of the field does not display correctly between widows and linux so I need to make sure that the text is not going to get truncated on linux. Second we are developing a report that the user will be able to set thier own font preference for and therefore I need to make sure the data will actually display regardless of thier choice. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now