I have a problem with xdp form. I have two pages on the template, lets say details page and a summary page. There is a table on details page which can be broken onto several pages. This table has a footer with some totals. In case of data/table fits on one page (table os not broken), i have to display the footer with totals and hide the summary page. And if table is broken onto several pages i have to hide the footer on details page and display the summary page. The biggest issue here is that one of the cells is dynamic and it depends on data that comes from application. This cell contains name, last name, address line1, address line2, address line3, city, state, zip lines. I cannot know how much data user has entered into these fields, thus cannot make this cell to be fixed height.
Yes there are several ways to look at where items are actually positioned on a page or pages of a rendered form. The form model will not tell you the rendered positional elements so you need to use the layout object model. There isnt as much documentation but some of it is described in http://www.adobe.com/go/learn_lc_scriptingReference
To see if an object spans multiple pages, use pageSpan and page methods.
xfa.layout.absPage( <objectref> ) ;
will return the dynamic page number the object starts on and
xfa.layout.absPageSpan( <objectref> ) ;
will return the number of pages the object spans