Thanks to the help of kind people on this forum I have a script that
does everything I want it to do on about 99% of all designs I have
to deal with. The other 1% would be those which are not in themselves
central to the Illustrator page because of uneven placement of elements in
them.
The problem is illustrated thus: the uneven masked-off bleed on this example, when stepped, repeated
and grouped to create my plate layout prevents it from being centered on the page as I need it to be:
and my solution -
I draw a rectangle which shares the center point of the design's keyline and is bigger than everything in
the original. When this is stepped (four across) and repeated (two back) the plate layout comes out in the
center of the page; and then I delete the rectangles from it and it looks like it should:
That works, of course, but I'd really like to achieve programatically what I did manually, creating a rectangle
that sits on the same center point as the keyline of the artwork and extends beyond its furthest limits.
I'm not sure even how to start the calculations to work out how far the rectangle would need to extend;
or if you could create a pathItem and sit it on another's central point.
Perhaps it'd be a better idea, if possible, to offset the keyline path until it extends further than the (invisible)
bleed, but how to know when it was big enough ......?
Any advice (especially mathematical!) would be most gratefully received.
KORGPOLLY