Highlighted

Stop Page Breaks / Flowing to next page

Avatar

15-01-2009

Hello,



A page of my form has a positioned subform. Within that subform is a flowed subform. Within that are 5 flowed subforms.



I need the 5 flowed subforms to expand/flow as needed but NOT beyond the page they are on.



Fiddling with the page breaks on various subforms allows the content to break to the next page or flow off the page into nowhere but I want it to simply stop flowing when the bottom margin is reached. No more content can be added unless you remove some.



Anyone?

Replies

Highlighted

Avatar

16-01-2009

All subforms have "allow page breaks within content" unchecked?

Maybe try to restrict the page occurrence in the masterpage tab to max 1



a funny workaround would be to use a monospaced (fixed-pitch) font like courier and limit the number of chars.
Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

16-01-2009

The product will not do this automatically. When you set something to flowed it will flow ...even beyond the page boundry. That is why there is a page break setting.



To do what you want you coudl check the position of the last subform and see if there is enough space to the end of the page to add a new one. If there is ...add it ...if not ...put up a message.



You will need to know the height of the subform you want to add.
Highlighted

Avatar

Avatar

Ryan_Lunka

Avatar

Ryan_Lunka

Ryan_Lunka

20-01-2009

Paul's idea may work, but I know in the past I've had issues retrieving the height of a flowable subform at runtime. Every time I've tried to get the dynamic height of a flowable subform, it ends up coming back null. If anyone finds a solution to this please post it. This would be very helpful to know.



Thanks!



Ryan D. Lunka

Cardinal Solutions Group

rlunka@cardinalsolutions.com
Highlighted

Avatar

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692

Avatar

pguerett

Total Posts

7.7K

Likes

611

Correct Answer

692
pguerett

20-01-2009

You have to query the layout Dom ...



xfa.layout.h(ObjectName, "units");



for example:



var oH = xfa.layout.h(txtDescription, "in");