On 20/09/2010 12:05, Ernst Plüss wrote: > Hi > > I've the following requirement. I want to display a list of customers in > a PdfPTable. The customers are sorted and grouped by country. Every > time a new country starts, I add an extra row with the country name. > This works fine.
You are probably using one large table, adding all the information to this single table. Note that if you use separate tables (one table for each country), the resulting PDF will look (almost) exactly the same (nobody will notice something is different). > An additional requirement is that this extra row must not be there if > it's the last or first row on the page. How can I do that? If you add the information in separate tables, you can use ColumnText in simulation mode to check if a table fits the page. It's easy to check if the country row is the last one on the table: try adding a table with 2 rows, if it doesn't fit: add the table to the next page. Of course, if you move the table to the next page, then the country row will be the first row on the page. I don't really understand that specific part of your requirement. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
