This content has been marked as final. Show 3 replies
CoordinateSpaces.pasteboardCoordinates is the global measurement system--that is, it extends behind all pages and all spreads, and it is always in points, regardless of your current units of measurement. Is that really what you want?
If you're working with objects that have not been transformed (scaled or rotated), then it's usually easier to work with geometricBounds, which returns the bounds of the object in current ruler units, in the form: y1, x1, y2, x2. If you set your ruler origin to page origin, then the values you get back will match those you see in the user interface (in the Control panel and the Transform panel). Is that what you're looking for?
Thank you, very match, Olav.
"myDocument.viewPreferences.rulerOrigin = RulerOrigin.PAGE_ORIGIN;"
Best Regars and good luck!.
I never noticed that resolve function before! I could probably come up
with some scenarios where it would be useful!
FWIW, visibleBounds is usually better than geometricBounds. It works on
transformed objects as well.