Hi,
I will start by saying that I have not run you code, will try and do that later, but a couple of points I have noticed from your code.
1. Are all your tables on the first page of any document ? as you use this variable (
var addPageLocation = 0;
And it doesn't change between runs?
2. you have a number of lines of code that don't appear to be used
var geometricbound = mySel.geometricBounds;
geometricbound[2] = geometricbound[0] + table.height/2;
// the above two lines work with the bounds,
// and then the line below just overwrites them
geometricbound= [95.891, 37.5, 730.458, 576];
and then when you could use it, you just put in the number anyway.
I understand that you may be working through how to get this to work, but I would remove code that you don't need, as you can always put it back in later, and it just adds confusion to other ( me) when they are trying to understand your code.
I think the addPageLocation should be calculated from the page where the table lives, as if I understand the problem correctly, you want any table where the table is longer than the page to continue onto the next page ?
... View more