GAMBELLI Raffaele wrote: > I believe that a PdfPCell cannot accept directly a Paragraph as Element...in > fact if you see its constructors you will notice that there isn't a > constructor which takes a Parapgraph as arguments...
That's not the problem. Paragraph extends Phrase; the Paragraph will be considered as a Phrase if you construct a PdfPCell with it. I have tested the code and it works. I think the original poster is wrong when he thinks the document is empty. He's using an example he has found somewhere, but he doesn't understand what it's about. Have a look at this line: table.writeSelectedRows(0, -1, document.leftMargin(), document.topMargin(), writer.getDirectContent()); Because it says document.topMargin() the original poster probably thinks the table should appear at the top of the page, as a 'header' (his words). That assumption is wrong; document.topMargin() is something like 36 pt (half an inch). If you use this value in writeSelectedRows, you'll draw the table at 36 from the bottom (in other words: it's more like a footer than a header). best regards, Bruno ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ 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/
