Hi,
it's not that difficult to keep tables the same size. The layout processor can determine the exact size of every object via script. This can be used to "transfer" the value to other objects.
This is a calculate script to copy the cell heights of Table1 over to Table2.
You possible have to modify this script to work with your form.
var cUnit = "mm",
nCellHeight = -1,
oInputRows = Table1.resolveNodes('#subform.[layout eq "row"]'),
oOutputRow = Table2.resolveNodes('#subform.[layout eq "row"]'),
i;
if (oInputRows.length === oOutputRow.length) {
for (i = 0; i < oInputRows.length; i += 1) {
// get the height of the first draw object in the row
nCellHeight = xfa.layout.h(oInputRows.item(i).resolveNode('#draw'), cUnit);
// set the same height to the first draw object in the other table
oOutputRow.item(i).resolveNode('#draw').h = nCellHeight.toString().concat(cUnit);
}
// Recreate the layout, to see the effects
xfa.layout.relayout();
}
The visibiliy of the reference block can be easily set. You only need to determine if it's on the last page or not. Put this into the layout:ready event of the reference object.
this.presence = (xfa.layout.page(this) < xfa.layout.pageCount()) ? "invisible" : "visible";