Latest object model fully support Multi-page PDF Importing?
Copy link to clipboard
Copied
Hi all, Illustrator has a decent Multi-page PDF import function at the moment.
But I could not figure out how to do this with the script(app.preferences.PDFFileOptions) to import multi pages at once, instead of one by one.
Could anyone please help?
Thank you.
Explore related tutorials & articles
Copy link to clipboard
Copied
try this script
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
var pdfOptions = app.preferences.PDFFileOptions;
pdfOptions.pageRangeToOpen = "1-2"; // or "all"
var idoc = app.open(File("C:/Users/canto/Google Drive/Adobe Scripts/illustrator_CS6_QuickStart_Guide.pdf")); // full path to your pdf
app.userInteractionLevel = UserInteractionLevel.DISPLAYALERTS;
Copy link to clipboard
Copied
It works fine.
Thank you very much.
Copy link to clipboard
Copied
glad to hear it helped
Copy link to clipboard
Copied
Carlos, very sorry, bother you in here. variable is "all", so after open pdf, it will be generated clipping mask. but variable is number(1-2), it is OK. why ?
Copy link to clipboard
Copied
@rui huang that's the default behavior, when pageToOpen is "all", the pdf opens as Links. When you open a "range", ie "1-3" the pdf opens Embedded.
you can change the default by explicitly setting the the following property
pdfOptions.placeAsLinks = false; // false = embed, true = link
Copy link to clipboard
Copied
Beyond words to thank
![](/skins/images/C7B7395F10C993F80946B590DC389058/responsive_peak/images/icon_anonymous_message.png)
![](/skins/images/C7B7395F10C993F80946B590DC389058/responsive_peak/images/icon_anonymous_message.png)