Thanks for the prompt reply. I was afraid of that. Unfortunately, for the body of the document, I'll have an even worse problem. I intended to use ColumnText or MultiColumnText to float around an image. But if I need a certain letter spacing, it looks like none of that would work, either.
Any chance of the notion of character-spacing being supported in one of the higher level objects (Chunk?) sometime soon? 1T3XT info wrote: > > bo.benson wrote: >> Ok. >> >> What is the best way to have a center-aligned, multi-line paragraph with >> wider character spacing? > > You'll have to do some calculations to achieve this. > You need: > - a Rectangle (can be provided in a cell event). > - a BaseFont and a font size > - Some text > > Use baseFont.getWidthPoint to find out the width of > the text using a certain font size. If it fits the > width of the rectangle taking the extra char space > into accoutn, use showTextAligned with Element.ALIGN_CENTER. > If it doesn't fit, cut the text into pieces that fit the width. > > Basically, you need to do the work that happens internally > in ColumnText/PdfLine, but add the concept of character > spacing. > -- > This answer is provided by 1T3XT BVBA > http://www.1t3xt.com/ - http://www.1t3xt.info > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables unlimited > royalty-free distribution of the report engine for externally facing > server and web deployment. > http://p.sf.net/sfu/businessobjects > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.1t3xt.com/docs/book.php > Check the site with examples before you ask questions: > http://www.1t3xt.info/examples/ > You can also search the keywords list: > http://1t3xt.info/tutorials/keywords/ > > -- View this message in context: http://www.nabble.com/alignment-calculations-wrong-with-character-spacing-tp24018542p24039066.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/