Created
June 21, 2012 11:19
-
-
Save bastien/2965196 to your computer and use it in GitHub Desktop.
Imports a single page InDesign document into another
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var doc = app.activeDocument; | |
var docPath = doc.fullName; | |
var importDoc = app.open(File('~/test_extract.indd'), false); | |
var pageToImport = importDoc.pages.firstItem(); | |
importDoc.pages.add(LocationOptions.AT_END); // Documents must have at least 1 page | |
pageToImport.move(LocationOptions.AFTER, doc.pages.firstItem()); | |
doc.pages.item(2).remove(); | |
importDoc.close(SaveOptions.no); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment