Counts the objects in the document.
Document
The active containment object for the layers and all other objects in the script; the basic canvas for the file.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
| Channel[] | read/write | The selected channels. | |
| HistoryState | read/write | The history state to use with the history brush. | |
| HistoryState | read/write | The current history state for this document. | |
| Layer | read/write | The selected layer. | |
| ArtLayers |
readonly | The art layers collection in the document. | |
| ArtLayer | readonly | The background layer for the document. | |
| BitsPerChannelType | read/write | The number of bits per channel. | |
| Channels |
readonly | The channels collection in this document. | |
| String | read/write | The name of the color profile. Valid only when no value is specified for color profile kind (to indicate a custom color profile). | |
| ColorProfileType | read/write | The type of color model that defines the working space of the document. | |
| ColorSamplers |
readonly | The current color samplers associated with the document. | |
| Channel[] | readonly | The color component channels for this document. | |
| CountItems |
readonly | The current count items in the document. | |
| File | readonly | The full path name of the document. | |
| Guides |
readonly | The guides in this document. | |
| UnitValue | readonly | The height of the document. | |
| Int[] | 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. | |
| Int | readonly | The unique ID of this document. | |
| DocumentInfo | 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. | |
| Boolean | readonly | If true, the document is a workgroup document. | |
| MeasurementScale | readonly | The measurement scale of the document. | |
| DocumentMode | readonly | The color profile. | |
| String | readonly | The document name. | |
| The | readonly | The object's container. | |
| File | readonly | The path to the document. | |
| PathItems |
readonly | The path items collection in this document. | |
| Number | read/write | The (custom) pixel aspect ratio of the document. Range: 0.100 to 10.000. | |
| DocumentPrintSettings | readonly | Document print settings. | |
| Boolean | read/write | If true, the document is in Quick Mask mode. | |
| Number | readonly | The resolution of the document (in pixels per inch) | |
| Boolean | readonly | If true, the document been saved since the last change. | |
| Selection | readonly | The selected area of the document. | |
| String | readonly | The class name of the object. | |
| UnitValue | readonly | The width of the document. | |
| XMPMetadata | readonly | The XMP properties of the document. The Camera RAW settings are stored here. |
Methods
Changes the mode of the document.
Closes the document.
Converts the document from using one color profile to using another.
Crops the document.
Duplicate this object.
Creates a duplicate of the document object.
Exports the document.
Flattens all layers.
Flips the canvas horizontally or vertically.
Imports annotations into the document.
Flattens all visible layers in the document.
Pastes contents of the clipboard into the document.
Prints the document.
Print one copy of the document.
Rasterizes all layers.
Records the measurements of document.
Changes the size of the canvas.
Changes the size of the image.
Expands the document to show clipped sections.
Rotates the canvas.
Saves the document.
Saves the document with the specified save options.
Splits the channels of the document.
Provides a single history state for the entire script. Allows a single undo for all actions taken in the script.
Applies trapping to a CMYK document. Valid only when 'mode' = CMYK.
Trims the transparent area around the image on the specified sides of the canvas.
Object of 1
Properties elsewhere that hold a Document.
Parameter of 1
Method parameters that accept a Document.
Return 7
Methods that return a Document.