I am trying to use Chunks in table cells and generate an RTF using RtfWriter2. My Chunks each will have a different font and added to the table cell. However, only the first font is used for all the chunks. Here is the code:
Table tbl = new Table( 2 ); RtfCell cell = new RtfCell( new Paragraph( "Task Type", new RtfFont( "Arial", 11, RtfFont.BOLD, Color.BLACK ) ) ); tbl.addCell( cell ); cell = new RtfCell(); cell.add( new Chunk( untickedBox, new RtfFont( "Arial", 11, RtfFont.NORMAL, Color.BLACK ) ) ); cell.add( new Chunk( " Planned\t\t", new RtfFont( "Wingdings", 11, RtfFont.NORMAL, Color.BLACK ) ) ); cell.add( new Chunk( untickedBox, new RtfFont( "Arial", 11, RtfFont.NORMAL, Color.BLACK ) ) ); cell.add( new Chunk( " Unplanned\n", new RtfFont( "Wingdings", 11, RtfFont.NORMAL, Color.BLACK ) ) ); tbl.addCell( cell ); document.add( tbl ); Is this a bug or am I doing something wrong ? If I don't add the Chunks to the table, but I add them to the document, I am getting the results I seek... Thanks, Danny ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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/