Backer, Lisa H. wrote: >1) how I force the alignment to be within coordinates I specifiy > You see you get the coordinates of a box (rectangle) from the database. I think ColumnText would be the ideal way to fit the text inside this rectangle. Create a ColumnText object with writer.getDirectContent() as parameter; wrap the text you want to add in a Phrase, then use this method to position the phrase inside a rectangle with a certain alignment and a leading (in PDF, the leading is the space between two baselines). http://itext.ugent.be/library/api/com/lowagie/text/pdf/ColumnText.html#setSimpleColumn(com.lowagie.text.Phrase,%20float,%20float,%20float,%20float,%20float,%20int)
> 2) how I can prevent it from stripping the spaces? > > By using a non breaking space character (I always forget the ASCII code, but Paulo has posted it very often here). I wouldn't go for this solution. It's not that elegant as solution 1) br, Bruno ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
