Hello sharp coder, please read this to start with: http://lowagie.com/node/205 I have no idea why that many people think they're subscribed to the REAL iText mailing list, when in reality, they only have an account for a third party service that has no relationship whatsoever with iText.
On 17/09/2011 21:59, sharpcoder wrote: > I need to fill a rectangle with a paragraph of text with the max size > possible. If there is more text, the font shrinks, less text, bigger font > (with a max/min size of course). I've been looking all over and can't find > any code. Which is surprising, because what you're trying to do is rather trivial. > Right now I'm using column text and adding a paragraph. I've tried > BaseFont.GetWidth but it's the same no matter the fontSize. ??? First of all: it's BaseFont.getWidthPoint(string, fontsize) if you want to get the width in points, rather than in glyph space units. Second of all: did you take a look at the examples? See for instance: http://examples.itextpdf.com/results/part1/chapter03/foobar_film_festival.pdf The Chunk width of the String "Foobar Film Festival" clearly changes if you change the font / font size. ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA http://p.sf.net/sfu/rim-devcon-copy2 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
