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

Help to open PDF and show only "Import PDF" dialog in Photoshop

Community Beginner ,
Apr 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

Hello,

 

I want to open a .pdf file with script and doesn't show "Import PDF" dialog, it opens first page without ask.

 
var file = new File(filePath);
app.open(file);

 

I am trying to show the dialog but it always show Finder before

 
var file = new File(filePath);
app.displayDialogs = DialogModes.ALL;
app.open(file);
app.displayDialogs = DialogModes.ERROR;
 
I want to show only the dialog about pdf, not choose the file.
 
Someone knows a solution?
 
Thanks

 

TOPICS
Actions and scripting , macOS

Views

364

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
LEGEND ,
Apr 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

If you change ALL to NO will it display the dialog without showing Finder?

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 Beginner ,
Apr 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

No, then it doesn't show no dialog

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
LEGEND ,
Apr 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

Why don't you check in available Ps scripting documentation how to use PDFOpenOptions?

You may also search this community for above function. You will find many similar threads...

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 Beginner ,
Apr 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

I checked this documentation, but as far as I know, it only explains options to choose by code.

Searched also in Google and adobe forums and I din't found a solution

I want to give to the user the option to choose. Show the same dialog when open a PDF from finder/explorer.

Screenshot 2022-04-26 at 23.40.08.png

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
LEGEND ,
Apr 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

It looks like it's constructed this way (or that's a bug). I tried it with PDFOpenOptions both by Document Object Model and Action Manager and it forces Explorer, even if path is specified.

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 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

The script from the late JJMack in the following topic does not present the dialog:

 

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
LEGEND ,
Apr 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

I didn't try it but doesn't his script prompt to choose the file before displaying 'Import PDF' dialog?

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 26, 2022 Apr 26, 2022

Copy link to clipboard

Copied

Well, I'm now confused!


 

 

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 Beginner ,
Apr 27, 2022 Apr 27, 2022

Copy link to clipboard

Copied

Yes! I found this topic (before open this) and I have the same problem, if you choose DialogModes.ALL it asks for file (even if you pass the path), if you choose DialogModes.NO it doesn't show any dialog.

 

I don't know if may be is related with Photoshop version (I have 23.3.1 now), or is a bug...

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
LEGEND ,
Apr 27, 2022 Apr 27, 2022

Copy link to clipboard

Copied

LATEST

The same happens in CS6.

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