distribute
document.distribute() doesn't allow aligning of pages.
doc.distribute (doc.pages.everyItem(), DistributeOptions.HORIZONTAL_SPACE, true, 0)
RESULT:
Error: Invalid value of parameter "alignDistributeItems" of method "distribute". Expected array of PageItems, but received (Page,Page,Page).
Expected: I can align pages in the UI via Align panel so I expect I can do the same in scripting.
-
jon@StewartDesign.studio commented
A cluggy workaround is to use page.move() but that involves shuffling pages in front/back of each other to get them 0 aligned in the correct order:
// move all pages next to each other on same spread
pgSpine.move(LocationOptions.AT_END,pgBack.parent);
pgFront.move(LocationOptions.AT_END,pgBack.parent);