Document in Photoshop DOM
An open Photoshop document.
Instance Properties
| name | type | description |
|---|---|---|
| activeChannels | Array | selected channels for document |
| activeHistoryBrushSource | HistoryState | the current history state to use with the history brush for this document |
| activeHistoryState | HistoryState | the current history state for this document |
| activeLayer | ArtLayer | selected layer for document |
| artLayers | ArtLayers | (read only) |
| backgroundLayer | ArtLayer | (read only) background layer for the document |
| bitsPerChannel | Number | number of bits for each channel (8 or 16) |
| channels | Channels | (read only) |
| colorProfileName | String | name of color profile for document |
| colorProfileType | ColorProfile | type of color profile management for document |
| componentChannels | Array | (read only) all color component channels for this document |
| fullName | File | (read only) full path name of document |
| height | Number | (read only) height of document (unit value) |
| histogram | Array | (read only) a histogram of values for the composite document (only for RGB, CMYK and 'Indexed colors' documents) |
| historyStates | HistoryStates | (read only) |
| info | DocumentInfo | (read only) document information |
| layers | Layers | (read only) |
| layerSets | LayerSets | (read only) |
| managed | Boolean | (read only) is the document a workgroup document? |
| mode | DocumentMode | (read only) document mode |
| modified | Date | (read only) The date of the Folder's last modification. |
| name | String | (read only) the document's name |
| parent | Object | (read only) |
| path | File | (read only) the path of the document |
| quickMaskMode | Boolean | is the document in the quick mask mode? |
| resolution | Number | (read only) the resolution of the document (in pixels per inch) |
| saved | Boolean | (read only) has the document been saved since last change? |
| selection | Selection | (read only) the document's selection |
| typename | String | (read only) |
| width | Number | (read only) width of document (unit value) |
Instance Methods
| name | returns | description |
|---|---|---|
| changeMode(destinationMode,[options]) | (none) | change the mode of the document |
| close([saving]) | (none) | close the document |
| convertProfile(destinationProfile,intent,[blackPointCompensation],…) | (none) | convert the document from using one color profile to using another |
| crop(bounds,[angle],[width],…) | (none) | crop the document |
| exportDocument(exportIn,[exportAs],[options]) | (none) | |
| flatten() | (none) | flatten all layers in the document |
| flipCanvas(direction) | (none) | flip the canvas horizontally or vertically |
| importAnnotations(file) | (none) | import annotations into the document |
| mergeVisibleLayers() | (none) | flatten all visible layers in the document |
| paste([intoSelection]) | ArtLayer | paste contents of clipbopard into the document |
| print([postScriptEncoding],[sourceSpace],[printSpace],…) | (none) | print the document |
| rasterizeAllLayers() | (none) | rasterize all layers |
| resizeCanvas([width],[height],[anchor]) | (none) | change the size of the canvas |
| resizeImage([width],[height],[resolution],…) | (none) | change the size of the image |
| revealAll() | (none) | expand document to show clipped sections |
| rotateCanvas(angle) | (none) | rotate canvas of document |
| save() | (none) | save the document |
| saveAs(saveIn,[options],[asCopy],…) | (none) | save the document with specific save options |
| splitChannels() | Array | split channels of the document |
| trap(width) | (none) | apply trap to a CMYK document |
| trim([type],[top],[left],…) | (none) |
Properties that are a Document
| name | object | description |
|---|---|---|
| activeDocument | Application | The frontmost document |
Methods that return a Document
| name | of object | description |
|---|---|---|
| add([width],[height],[resolution],…) | Documents | |
| open(doc,[as]) | Application | Open the specified document. |