Legend
August 2, 2025
Answered
Special case? GeometricBounds positioning cannot be used when text boxes extend beyond bleed?
- August 2, 2025
- 3 replies
- 929 views
The object is just crossing the bleeding area, and it seems impossible to determine its position.
sel[j].parentPage;.marginPreferences.bottom;
will cause an error.
sel[j].parentPage;.marginPreferences.bottom;
will cause an error.


var sel = app.documents[0].selection;
var pp = sel[j].parentPage;
var b = app.activeDocument.selection[j].geometricBounds;
var sb = sel[0].visibleBounds;
var bm = pp.marginPreferences.bottom;
if(sel[j].parentPage == null);
b[1]<0&&b[3>0]&&b[3]<cp[0];
All combinations have failed...
if ((sel[j].parentPage == null && b[3] < 0) || ([1] < 0 && b[3] > 0 && b[3] < cp[0])) {
app.activeDocument.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;
sel[j].geometricBounds = [b[0], 0 - 20, b[2], b[3] - b[1] + 20];
}
if ((sel[j].parentPage == null) && (b[1] > 0)) {
app.activeDocument.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;
sel[j].geometricBounds = [b[0], 0 - 20, b[2], b[3] - b[1] - 20];
}


