From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED]
Sent: Tue 28-Sep-04 11:58
To: [EMAIL PROTECTED]
Subject: RE: [iText-questions] Nested tables
>And the answer is.... Use a PdfPTable.
I tried
following code instead. But now I get an empty document. What I
am doing
wrong?
Document doc = new
Document();
PdfWriter.getInstance(doc, new
FileOutputStream("test.pdf"));
doc.open();
Table table = new
Table(1);
float widths[] = new float[2];
widths[0] = (float) 0.3;
widths[1]
= (float) 0.7;
PdfPTable
nestedTable = new
PdfPTable(widths);
nestedTable.addCell("AAA");
nestedTable.addCell("BBB");
table.addCell(new
Cell(nestedTable));
//table.insertTable(nestedTable);
widths = new float[2];
widths[0] =
(float) 0.1;
widths[1] = (float)
0.9;
nestedTable = new
PdfPTable(widths);
nestedTable.setWidths(widths);
nestedTable.addCell("CCC");
nestedTable.addCell("DDD");
table.addCell(new
Cell(nestedTable));
//table.insertTable(nestedTable);
doc.add(table);
doc.close();
_______________________________________________________
Skicka
gratis SMS!
http://www.passagen.se
-------------------------------------------------------
This
SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT
products in your business? Tell us what you think of them. Give us
Your
Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
iText-questions
mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions
