Answered
Move group to the left or to right base on page number
Hello, I need to move all the content on even pages by 2 mm to the right and all the content on odd pages by 2 mm to the left. To do this, I am thinking of first creating a group of all the elements per page and then moving this group. I have a solution (thanks to @rob day ) to group all the items but now how can I move the group in the right direction?
Code by @rob day to group all items on each page.
spreads = app.documents[0].spreads.everyItem().getElements();
for (i = 0; i < spreads.length; i++) {
if (spreads[i].pageItems.length > 1) {
spreads[i].pageItems.everyItem().locked = false;
spreads[i].groups.add (spreads[i].pageItems);
}
}
