Hello All

I am a newbie & trying to create an RTF doc with a paragraph & a table.
The problem is tabel & paragraph are not left aligned properly.
below is my simple code.
Please guide me.

Thanks
Nehal.


Document doc = new Document();|
RtfWriter rtf = RtfWriter.getInstance(doc,new FileOutputStream(file));
Table table1 = new Table(2,2);
Cell cell1_1 = new Cell();
cell1_1.add(new Paragraph("row 1 cell 1"));
cell1_1.setColspan(2);
table1.addCell(cell1_1,0,0);
Cell cell2_1 = new Cell();
cell2_1.add(new Paragraph("row 2 cell 1"));
table1.addCell(cell2_1,1,0);
Cell cell2_2 = new Cell();
cell2_2.add(new Paragraph("row 2 cell 2"));
table1.addCell(cell2_2,1,1);
Paragraph p2 = new Paragraph("this is a test paragraph",
FontFactory.getFont(FontFactory.TIMES_ROMAN));
doc.open();
doc.add(p2);
doc.add(table1);
doc.close();


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to