Skip to content

PhotoshopFileOptions

preferences.photoshopFileOptions

Options for opening a Photoshop file, used with the Application.open() method. All properties are optional.


preferences.photoshopFileOptions.parent

The parent of this object.

Object; read-only.


PhotoshopFileOptions.pixelAspectRatioCorrection

Section titled “PhotoshopFileOptions.pixelAspectRatioCorrection”

preferences.photoshopFileOptions.pixelAspectRatioCorrection

If true, imported images that have a non-square pixel aspect ratio should be adjusted.

Boolean


preferences.photoshopFileOptions.preserveImageMaps

If true, image maps should be preserved when document is converted.

Default: true

Boolean


preferences.photoshopFileOptions.preserveLayers

If true, layers should be preserved when document is converted.

Default: true

Boolean


preferences.photoshopFileOptions.preserveSlices

If true, slices should be preserved when document is converted.

Default: true

Boolean


preferences.photoshopFileOptions.typename

The class name of the referenced object.

String; read-only.


// 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);
}