Skip to main content
Inspiring
August 27, 2014
Answered

Can i open PDF with certain page? [CS6-Java]

  • August 27, 2014
  • 1 reply
  • 943 views

i have to resave tons of pic from PDF. I can make AI call opening dialog:

app.open (myName, DocumentColorSpace.CMYK);

but i have to type in dialog page numbers manually. Can i enter a numbers in dialog by script?

thanks

This topic has been closed for replies.
Correct answer Silly-V

This is solved with the following object's usage:

var openOpts = app.preferences.PDFFileOptions;

openOpts.pageToOpen = 1; // insert your own number here

app.open(File(targetPath));

1 reply

Silly-V
Silly-VCorrect answer
Legend
July 31, 2018

This is solved with the following object's usage:

var openOpts = app.preferences.PDFFileOptions;

openOpts.pageToOpen = 1; // insert your own number here

app.open(File(targetPath));

Inspiring
April 3, 2024

sorry , bother you. do you know how to open pdf that is contains multiple page , and without prompt of select page?

Anubhav M
Community Manager
Community Manager
April 12, 2024

Hello @rui huang,

Thanks for reaching out. Would you mind sharing some more details, like the exact version of the OS/Illustrator, and the details of your workflow, so we can better assist you?

Looking forward to hearing from you.

 

Thanks,

Anubhav