Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- This InDesign script duplicates each page in place instead of appending the duplicates to the end of the document (e.g. 1-2-3 becomes 1-1-2-2-3-3)
- */
- // Define variables
- var file = app.activeDocument;
- var pages = file.pages;
- var numberOfPages = pages.length;
- // Duplicate each page
- for (var i = 0; i < numberOfPages; i++) {
- pages[i].duplicate();
- }
- // Intertwine pages
- for (var j = 0; j < (numberOfPages - 1); j++) {
- var currentPage = (numberOfPages + j);
- var insertPoint = (j + j);
- pages[currentPage].move(LocationOptions.AFTER, pages[insertPoint]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement