Hi

 

I am trying to create a PDF using nested tables and I am having problems
with setting the table/cell attributes of the inner tables - they don't seem
to respond to any setBorder methods.

 

                                Table table1 = new Table(3);

                                table1.setBorderColor(new Color(0x000000));

                                table1.setBorderWidth(2);

                                table1.setPadding(2);

                                table1.setSpacing(2);

                                com.lowagie.text.Cell cell1 = new
com.lowagie.text.Cell(new Chunk("1", font)) ;

                                cell1.setColspan(2);

                                com.lowagie.text.Cell cell2 = new
com.lowagie.text.Cell(new Chunk("2", font)) ;

 

                                                Table table = new Table(3);

                                                table.setBorderWidth(1);

                                table.setPadding(2);

                                table.setSpacing(2);

 

                                                String nodeText = "Store1" ;

                                                font = new
Font(mfntHelvetica, 4f, Font.NORMAL);

                                                com.lowagie.text.Cell cell =
new com.lowagie.text.Cell(new Chunk(nodeText, font)) ;

                                                cell.setBorderWidth(0);

 

                                                table.addCell(cell) ;

 

                                                nodeText = "0045x" ;

                                                font = new
Font(mfntHelvetica, 16f, Font.NORMAL);

                                                cell = new
com.lowagie.text.Cell(new Chunk(nodeText, font)) ;

                                cell.setBorderColor(new Color(0xFFFFFF));

                                cell.setBorderColorRight(new
Color(0x0000FF));

                                                cell.setBorderWidth(1);

                                                cell.setColspan(2);

                                                table.addCell(cell) ;

 

                                                cell1.add(table) ;

 

                                cell1.setUseVariableBorders(true) ;

                                cell1.setBorderColor(new Color(0xFFFFFF));

                                cell1.setBorderColorRight(new
Color(0x777777));

                                cell1.setBorderWidth(1);

                                cell2.setBorderWidth(0);

 

                                table1.addCell(cell1) ;

                                table1.addCell(cell2) ;

 

Has anyone else tried using nested tables ?

 

Jeff White

 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to