Help with simple repagination script
I have a 100 page cookbook that I need to print 2 up side by side on an 8.5x11 in page. Since this is not a booklet, using the Print As Booklet option won't work.
I created the output in InDesign and printed the pagesto a PDF.
I would like to now reorder the pages using this method:
4,1 2,3 8,5 6,7 etc.
This will allow me to print 2 up double sided and original page 1 will be married up with original page 2 and so on for the entire document.
A javascript loop might look something like:
let pages=document.pages;
let pagecount=pages.length;
for (var p=3;p<pagecount;p+=4) {
let fourthPage=pages.splice(p,1);
pages.splice(p-3,0,fourthPage);
}
Basicallly it would extract every fourth page and insert it at the front of those 4 pages resulting in a new page order.
Please tell me someone can help with this. It seems like such a simple request. Any help would be appreciated.
