I think this'll work from within a PdfPCellEvent... Let me see... Okay. This looks a bit fragile, but I think it will work. PdfPCellEvent.cellLayout() is called AFTER each cell is drawn.
The text and images within each given cell are written into canvases[PdfPTable.TEXTCANVAS], so that's where you need to begin and end all your marked content. And because cellLayout() is called afterwards, you need to close the current cell and open any/all tags for the next cell. Table row cell/ cell/ cell/ /row row cell/ cell/ cell/ /row /Table You'll need to begin the table, row, and cell marked content before cellLayout is called the first time. You'll need to know when a given cell ends a row so you can end that row and start the next one. And you'll need to know when the cell in question is the last cell in the table so you can end the cell, row, and table. Sadly, PdfPCell doesn't know it's own row/column, so you'll need to determine the current row/column some other way (just count the current row between calls, and ++row/col=0 when the cell rect's Y coord changes... Though I believe cells can change their padding/spanning individually, so that could get messy. Complex, but it looks possible. --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; Disclaimer<Cardiff> DisCard = null; > -----Original Message----- > From: wowarjuna [mailto:wowarj...@hotmail.com] > Sent: Tuesday, November 02, 2010 3:14 AM > To: itext-questions@lists.sourceforge.net > Subject: Re: [iText-questions] PdfStructureElement with ColumnText > > > Thanks a lot..u just saved my life..just another simple one.. > > PdfPTable table = new PdfPTable(1); > for (int _i = 0; _i < 100; _i++) > table.AddCell("Creates the PdfTemplate > that will hold the total number of pages."); > > > > PdfStructureElement mytable = new > PdfStructureElement(root, PdfName.TABLE); > > PdfStructureElement tr = new > PdfStructureElement(mytable, PdfName.TABLEROW); > > PdfStructureElement td = new > PdfStructureElement(tr, PdfName.TD); > > _column.AddElement(table); > > cb.BeginMarkedContentSequence(td); > _column.Go(); > cb.EndMarkedContentSequence(); > > Here is something which i want to show table with some > contents..The rows can span to mutiple pages...can u arrange > this sequnce to generate a table..With this i can suggest > iText for the application.. > > -- > View this message in context: > http://itext-general.2136553.n4.nabble.com/PdfStructureElement > -with-ColumnText-tp3023234p3023466.html > Sent from the iText - General mailing list archive at Nabble.com. > > -------------------------------------------------------------- > ---------------- > Nokia and AT&T present the 2010 Calling All Innovators-North > America contest Create new apps & games for the Nokia N8 for > consumers in U.S. and Canada $10 million total in prizes - > $4M cash, 500 devices, nearly $6M in marketing Develop with > Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Many questions posted to this list can (and will) be answered > with a reference to the iText book: > http://www.itextpdf.com/book/ Please check the keywords list > before you ask for examples: http://itextpdf.com/themes/keywords.php > > ------------------------------------------------------------------------------ Nokia and AT&T present the 2010 Calling All Innovators-North America contest Create new apps & games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php