Hello, I'm using iText .NET in an application to generate reports. These reports sometimes contain captions and tables that should not be separated by a page break. Other reports contain tables where multiple lines belong to each other and should not be split apart either.
Now iText's page break control doesn't seem to offer many possibilities. All I have found working for now is the PdfWriter.FitsPage(Table) method. Unfortunately, we don't use Table but PdfPTable objects that offer the functionality we need. So to get something working at all, I create a temporary Table, add some dummy rows and use that for page space testing. This table doesn't relate in any way to the real content that should be tested, but it comes close. Another alternative I have found NOT working is PdfWriter.GetVerticalPosition() which always claims that I'm already at the bottom of the page. I might be able to get a PdfPTable's height by its TotalHeight property, but I didn't get to try it out yet because the other thing doesn't work correctly. There's also another method (I've forgotten where) to test whether a PdfPTable fits a page, but it's private and thus not accessible to applications. What are the suggested ways to determine whether a PdfPTable fits a page so that I can begin a new page before inserting the table? Also, what is the suggested way to implement decent typographic flow control to automate those things, i.e. keeping elements together on a page and preventing orphans and widows? Is there any way to declare groups of table rows that must not be split over two pages other than creating separate table elements? And what can I do to a) keep two subsequent captions and the first 3 table rows on a page and b) keep the last 3 table rows on a page? ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ 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 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/
