Hello, I was wondering if anyone has tried to implement "keeps"? I have an iText application that lays down a typical document structure, with headings of various levels, text, tables, etc. I noticed that sometimes I get an orphaned heading at the bottom of a page, whereas I'd rather it get moved to the next page with whatever follows it (text, table, whatever). I know from past experience at a computerized/markup-based typesetting software company that such things are typically done incrementally in two passes, one to see where things lay down, and another to "fix up" by moving things to the next page.
A first attempt would be to note that a heading is "getting close to the bottom of a page" and simply break the page. I'm sure this would be a bit crude, but perhaps preferable to orphaned headings. A second attempt would be to lay down a heading, then lay down the next thing after it and see if any of it was on the same page. If not, then undo the heading and what follows, break the page and lay them down again. I do have an intermediate data structure with everything that will appear in the document. Would it help to not which things ended up on which pages, and if a redo has to happen, would I need to clear the entire page and redo the parts I know fit there? Or can you go back and just remove a couple of bits? Thanks for any information! Regards, Chris Dole ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
