You would have to do this in the layout ready event and updating the form structure in the layout ready can cause it to become unresponsive as it causes the event to fire again. This means you must be careful to remember what has caused the event to fire.
Anyway, here's a sample that should get you started. https://sites.google.com/site/livecycledesignercookbooks/home/ForcePageThrow.pdf?attredirects=0&d=1
Have a look at the Subform1 layout:ready event code.
That was really helpful to understand.
Glad you got it working.
The absPageSpan() method returns an integer giving the number of pages an object spans, so it your case if it spans more than 1 page we know we have to do something (if it is small enough), Adobe LiveCycle ES4 * absPageSpan
That work superbly, like a charm, no words for it. I did not find any solution to this before this attachment. Sorry I took long to reply.
Can you please explain a little it to me? I tried comments but did not get it.
What xfa.layout.absPageSpan(Subform1) return ??
It was really what I want.
Thanks a lot and really appreciate you help.