Copy link to clipboard
Copied
I have 736 pages document which is auto-generated (through our javascripts) with more sidebars (anchored objects/text-frames placed outside margin). There are cases where the sidebars overlapping with each other. One of the solutions we could think of is that we will have to check each page for overlapping objects (find all frames and check whether they overlap in a page and go to next page and so on) but it is very time consuming as the overlapping objects may be there in ~75 pages but the script will have to check all 736 pages. Is there any other way to directly find the objects that overlaps (excluding the group objects).
Any help on this is greatly appreciated.
Copy link to clipboard
Copied
If your only looking for anchored objects you can find them with a grep and then you'll only have to deal with them.
There are post here on finding them.
Copy link to clipboard
Copied
app.findGrepPreferences.findWhat = "~a";
Copy link to clipboard
Copied
Thanks Trevor, but how to find only the anchored objects that overlaps instead of finding all anchored objects and checking whether they overlap with any other anchored objects.
Copy link to clipboard
Copied
You can't do that.
What you need to depends on the doc setup.
typically you will need to fetch all the objects with the grep and then map each object to the spread it is on. Then you only need to compare object on the same spread and that should go quickly