Mirco Piccin wrote: > Hi all. > Maybe a silly question. > > I need to produce a PDF structured as exampled in the image attached > (example.jpg). > I'm a newbie with iText (and to be honest, also with java ... :-D). > > I'm doing the job in this way: > > create a table, set property of table > create cell, set content and property of cell > close tab > empty table > > and again : > create cell, set content and property of cell > close tab > empty table > > and again and again..
I would write a method that creates a PdfPTable, and maybe even adds it to the document. Call that method with the content that needs to be in the cells. Also: if all cells have the same properties, you can change the property of the "default cell" at the PdfPTable level. This reduces the number of code lines in your code. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
