Avoid "Import PDF" dialogue in Photoshop Scripting

Community Beginner ,
May 02, 2022 May 02, 2022

Copy link to clipboard

Copied

Hi there,

So I am doing the Scripting Guide example of Importing a pdf and unfortunately when using this option seems that Photoshop is prompting for more options for the PDF, on what it kills the purpose of the Script

At the moment I am on

var fileRef = new File ("/c/myfile/path.pdf");

var pdfOpenOptions = new PDFOpenOptions;
pdfOpenOptions.antiAlias = true;
pdfOpenOptions.mode = OpenDocumentMode.RGB;
pdfOpenOptions.resolution = 72;
pdfOpenOptions.page = 3;
app.open(fileRef, pdfOpenOptions);

 

And is prompting an "Import PDF" dialogue.
Anyone knows how to supress thisone? Thank you

TOPICS
Actions and scripting , Windows

Views

37

Likes

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

LEGEND , May 02, 2022 May 02, 2022
Put at top: displayDialogs = DialogModes.NO Check links in this thread: Help to open PDF and show only "Import PDF" dialog in Photoshop

Likes

Translate

Translate
LEGEND ,
May 02, 2022 May 02, 2022

Copy link to clipboard

Copied

 

Put at top:

displayDialogs = DialogModes.NO

Check links in this thread: Help to open PDF and show only "Import PDF" dialog in Photoshop

 

Likes

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 Beginner ,
May 02, 2022 May 02, 2022

Copy link to clipboard

Copied

LATEST

Thanks for your help !!

Likes

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 Beginner ,
May 02, 2022 May 02, 2022

Copy link to clipboard

Copied

As per same manual the following line must be prepended

app.displayDialogs = DialogModes.NO;

Likes

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