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

How to import psd file in Illustrator through jsx ?

Adobe Employee ,
Mar 01, 2023 Mar 01, 2023

Copy link to clipboard

Copied

Hi all,

I want to import a psd file in Illustrator with different option selected while importing . I am using -

var file_1 = new File(Path + "file.psd");
   PSDOptions = app.preferences.photoshopFileOptions;
    app.open(file_1, DocumentColorSpace.RGB, PSDOptions);  
 
But I am getting error- 
Error: unknown open options found
Hope anyone has answer to my query.
 
Thanks in advance !!
   

 

TOPICS
Scripting

Views

251

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

Community Expert , Mar 01, 2023 Mar 01, 2023

Hi @Daksri, I've never done this before, but when I tried it out just now, the result didn't seem very satisfying. To me, the API for this seems a bit rudimentary.

 

Here is the best I could do:

app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;

var myPath = '~/Desktop/';
var file_1 = new File(myPath + "file.psd");

app.preferences.photoshopFileOptionslayerComp = undefined;
app.preferences.photoshopFileOptionspreserveImageMaps = true;
app.preferences.photoshopFileOptionspreserve
...

Votes

Translate

Translate
Community Expert ,
Mar 01, 2023 Mar 01, 2023

Copy link to clipboard

Copied

LATEST

Hi @Daksri, I've never done this before, but when I tried it out just now, the result didn't seem very satisfying. To me, the API for this seems a bit rudimentary.

 

Here is the best I could do:

app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;

var myPath = '~/Desktop/';
var file_1 = new File(myPath + "file.psd");

app.preferences.photoshopFileOptionslayerComp = undefined;
app.preferences.photoshopFileOptionspreserveImageMaps = true;
app.preferences.photoshopFileOptionspreserveHiddenLayers = true;
app.preferences.photoshopFileOptionspreserveLayers = true;
app.preferences.photoshopFileOptionspreserveSlices = false

app.open(file_1);

 

Hopefully someone with more experience will chime in with a better result. 🙂

- Mark 

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