Skip to main content
Participant
May 2, 2022
Answered

Avoid "Import PDF" dialogue in Photoshop Scripting

  • May 2, 2022
  • 2 replies
  • 393 views

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

This topic has been closed for replies.
Correct answer Kukurykus

 

Put at top:

displayDialogs = DialogModes.NO

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

 

2 replies

Participant
May 2, 2022

As per same manual the following line must be prepended

app.displayDialogs = DialogModes.NO;
Kukurykus
KukurykusCorrect answer
Legend
May 2, 2022

 

Put at top:

displayDialogs = DialogModes.NO

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

 

Participant
May 2, 2022

Thanks for your help !!