Skip to content

Instantly share code, notes, and snippets.

@grefel
Last active July 21, 2016 09:59
Show Gist options
  • Save grefel/75da0278dfb3c8a45adf to your computer and use it in GitHub Desktop.
Save grefel/75da0278dfb3c8a45adf to your computer and use it in GitHub Desktop.
Get next Page #InDesign #JS
function getNextPage(page) {
var dok = page.parent.parent;
var nextPage = dok.pages[page.documentOffset+1];
if (!nextPage.isValid) {
nextPage = dok.pages.add();
nextPage.appliedMaster = page.appliedMaster;
}
return nextPage;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment