Minimizing Page Breaks In Long Documents

Minimizing Page Breaks In Long Documents

Forum member · Nov 9, 2006
Hi, We're trying to generate a document with several variable & fixed length items in it. eg some fixed length sections of text/labels interspersed with variable length tables / fixed length tables etc. eg Fixed Length Cover Page Text Variable Length Table Fixed Length Text Variable Length Table Fixed Length Table Variable Length Table I've come up with a solution that creates a new Page for each variable length item but this has also resulted in each subsequent item (after the variable length item) starting on a new Page. I see there is a GetRequiredHeight method available with TextArea's & Table's so I was thinking of utilising that - but before I started making the code more complicated, I thought I'd ask for any other ideas/suggestions as to how I can minimize the number of page breaks. Someone at my work reckons there might be a way of assigning a page to a Template and then the Template will handle all the paging. I tried searching the help but could not find this technique mentioned. Is this another possible option? Thanks in advance, Adrian

Re: Minimizing Page Breaks In Long Documents

Support · Nov 10, 2006
Hello Adrian, While adding this kind of contents to the PDF you will have to keep watch on the Y coordinate. You can get the height required by the TextArea or a Table with the GetRequiredHeight method and add some padding to this height and add the next element from this Y position. If there is any overflow of records( records which do not fit in a single page ) then you can get them by GetOverflowRows method of the table object and you can add these records to a new page. You can refer to the Table Continuation topic in our help documentation. Similar way you can get the overflow text of a TextArea also by using the GetOverflowTextArea method, refer to the Text Continuation topic in our help documentation. A Template can not be useful for this condition, If you are going to add same elements or contents to all the pages then you can use a template and add the template to the document. Thanks, ceTe Software Support Team.