Document

Description

The active containment object for the layers and all other objects in the script; the basic canvas for the file.

Properties

activeChannels readonly The selected channels.
activeHistoryBrushSource readonly The history state to use with the history brush.
activeHistoryState readonly The current history state for this document.
activeLayer readonly The selected layer.
artLayers readonly The art layers collection in the document.
backgroundLayer readonly The background layer for the document.
bitsPerChannel readonly The number of bits per channel.
channels readonly The channels collection in this document.
colorProfileName readonly The name of the color profile. Valid only when no value is specified for color profile kind (to indicate a custom color profile).
colorProfileType readonly The type of color model that defines the working space of the document.
colorSamplers readonly The current color samplers associated with the document.
componentChannels readonly The color component channels for this document.
countItems readonly The current count items in the document.
fullName readonly The full path name of the document.
guides readonly The guides in this document.
height readonly The height of the document.
histogram readonly A histogram showing the number of pixels at each color intensity level for the composite channel.
historyStates readonly The history states collection in this document.
id readonly The unique ID of this document.
info readonly Metadata about the document.
layerComps readonly The layer comps collection in this document.
layerSets readonly The layer sets collection in the document.
layers readonly The layers collection in the document.
managed readonly If true, the document is a workgroup document.
measurementScale readonly The measurement scale of the document.
mode readonly The color profile.
name readonly The document name.
parent readonly The object’s container.
path readonly The path to the document.
pathItems readonly The path items collection in this document.
pixelAspectRatio readonly The (custom) pixel aspect ratio of the document. Range: 0.100 to 10.000.
printSettings readonly Document print settings.
quickMaskMode readonly If true, the document is in Quick Mask mode.
resolution readonly The resolution of the document (in pixels per inch)
saved readonly If true, the document been saved since the last change.
selection readonly The selected area of the document.
typename readonly The class name of the object.
width readonly The width of the document.
xmpMetadata readonly The XMP properties of the document. The Camera RAW settings are stored here.

Methods

autoCount readonly Counts the objects in the document.
changeMode readonly Changes the mode of the document.
close readonly Closes the document.
convertProfile readonly Converts the document from using one color profile to using another.
crop readonly Crops the document.
duplicate readonly Duplicate this object.
duplicate readonly Creates a duplicate of the document object.
exportDocument readonly Exports the document.
flatten readonly Flattens all layers.
flipCanvas readonly Flips the canvas horizontally or vertically.
importAnnotations readonly Imports annotations into the document.
mergeVisibleLayers readonly Flattens all visible layers in the document.
paste readonly Pastes contents of the clipboard into the document.
print readonly Prints the document.
printOneCopy readonly Print one copy of the document.
rasterizeAllLayers readonly Rasterizes all layers.
recordMeasurements readonly Records the measurements of document.
resizeCanvas readonly Changes the size of the canvas.
resizeImage readonly Changes the size of the image.
revealAll readonly Expands the document to show clipped sections.
rotateCanvas readonly Rotates the canvas.
save readonly Saves the document.
saveAs readonly Saves the document with the specified save options.
splitChannels readonly Splits the channels of the document.
suspendHistory readonly Provides a single history state for the entire script. Allows a single undo for all actions taken in the script.
trap readonly Applies trapping to a CMYK document. Valid only when ‘mode’ = CMYK.
trim readonly Trims the transparent area around the image on the specified sides of the canvas.