• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Latest object model fully support Multi-page PDF Importing?

New Here ,
Dec 01, 2021 Dec 01, 2021

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.

 

TOPICS
Scripting

Views

330

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Dec 02, 2021 Dec 02, 2021

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;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 07, 2021 Dec 07, 2021

Copy link to clipboard

Copied

It works fine.

Thank you very much.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 08, 2021 Dec 08, 2021

Copy link to clipboard

Copied

glad to hear it helped

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 02, 2024 Apr 02, 2024

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 ?

ruihuang_0-1712108590842.pngexpand image

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 03, 2024 Apr 03, 2024

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

LATEST

Beyond words to thank

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines