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

How do I open a PDF page via scripting ?

Advocate ,
Dec 13, 2021 Dec 13, 2021

Copy link to clipboard

Copied

I am extracting some layout information from PDF pages using ExtendScript in Illustrator. This works fine but as I need to automate the entire process, I am now looking for a method to open an existing PDF on a specified page in Illustrator from ExtendScript. The scripting reference just mentions the open( ) function with very little details on available options. Is there a more elaborate reference to be found somewhere?

If experienced scripters (or Adobe developers) know that my task is impossible to automate, please let me know so I can stop this wild goose chase before it eats up all my budget. But of course I would prefer finding a method to do what I intend to do.

TOPICS
Import and export , Scripting

Views

410

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

correct answers 1 Correct answer

Guide , Dec 13, 2021 Dec 13, 2021

To open page 2 of the PDF file "pdf1" on my desktop:

app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
var options1 = app.preferences.PDFFileOptions;
options1.pageToOpen = 2;
open(new File("~/Desktop/pdf1.pdf"), DocumentColorSpace.CMYK);

 

Votes

Translate

Translate
Adobe
Guide ,
Dec 13, 2021 Dec 13, 2021

Copy link to clipboard

Copied

To open page 2 of the PDF file "pdf1" on my desktop:

app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
var options1 = app.preferences.PDFFileOptions;
options1.pageToOpen = 2;
open(new File("~/Desktop/pdf1.pdf"), DocumentColorSpace.CMYK);

 

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
Advocate ,
Dec 13, 2021 Dec 13, 2021

Copy link to clipboard

Copied

In FrameMaker scripting the options for opening are passed in the Open( ) method, so I never looked at generic app properties for this. It works beautifully. Thanks a bundle.

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

LATEST

how to open pdf that is contains multiple page  , and without prompt of select page?

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