Using photoshopFileOptions ?!?
I have a PSD file, containing layers, that I want to open in Illustrator.
To open PSD files, the Illustrator Scripting Guide suggests using the following construct
--------------------------------------------------------------------------------------------
// Opens a Photoshop file containing layers with
// preferences set to preserve layers
var psdOptions = preferences.photoshopFileOptions;
psdOptions.preserveLayers = true;
psdOptions.pixelAspectRatioCorrection = false;
// open a file using these prefs
var fileRef = File(psdFilePath);
if (fileRef != null) {
var docRef = open(fileRef, DocumentColorSpace.RGB);
}
------------------------------------------------------------------------------------------------------
and the Application.open() method is described as follows app.open(file[, documentColorSpace][, options])
i am trying to open psd files, not using a variable "fileRef".
--------------------------------------------------------------------------------------------------------
var fileRef = File(psdFilePath);
if (fileRef != null) {
var docRef = open(fileRef, DocumentColorSpace.RGB);
}
----------------------------------------------------------------------------------------------
In both cases, using or not using "var psdOptions", when opening a PSD file, the application shows a window "Photoshop Import Option".
Moreover, when using the notation
--------------------------------------------------------------------
var docRef = app.open(fileRef, DocumentColorSpace.RGB, psdOptions);
--------------------------------------------------------------------
Where I explicitly specify the options for opening a document, I get the following response:
Exception has occurred: 9007
unknown open options found.
Is this a bug, or am I not understanding something?
