Skip to content

Instantly share code, notes, and snippets.

@moluapple
Last active December 12, 2015 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moluapple/9b43578fc414cfe8f717 to your computer and use it in GitHub Desktop.
Save moluapple/9b43578fc414cfe8f717 to your computer and use it in GitHub Desktop.
置入多页面PDF (Illustrator CC 2015)
var doc = activeDocument,
f = File.openDialog ('选择文件 ', '*.pdf'),
p = prompt ('置入第 1 到?页', 5, '指定页数')
i = 0;
for (; ++i <= p;) {
app.preferences.setIntegerPreference('plugin/PDFImport/PageNumber', i);
doc.placedItems.add().file = f;
}
app.preferences.setIntegerPreference('plugin/PDFImport/PageNumber', 1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment