On Wednesday 07 March 2007 19:02, J.S wrote: > Your solution is good but I don't want to use a table ( if I use it , I'll > have some probIem because I can't make table in a table ) > > There is another solution ? You can achieve the background colour using the RtfTab class:
RtfTab tab1 = new RtfTab(260, RtfTab.TAB_CENTER_ALIGN); RtfTab tab2 = new RtfTab(520, RtfTab.TAB_RIGHT_ALIGN); Paragraph par = new Paragraph(); par.add(tab1); par.add(tab2); Chunk chunk = new Chunk("\tText to align in the centre\t"); chunk.setBackground(Color.RED); par.add(chunk); Adding a horizontal line is a bit harder. Either you just use an underline (doesn't look perfect, but is easy), or you use the RtfShape class (little documentation and requires having a detailed look at the RTF specification). Greetings, Mark -- Your manuscript is both good and original, but the part that is good is not original and the part that is original is not good. -- Samuel Johnson My GPG public key is available at: http://www.edu.uni-klu.ac.at/~mhall/data/security/MarkHall.asc
pgpdWALemXRGS.pgp
Description: PGP signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/