InDesign2026
API 21.5.1.73
Object

DocumentPreference

Document preferences.

Preference DocumentPreference
Hierarchy

Application | Document

DocumentPreference

Properties

NameType AccessDescription
Boolean read/write If true, guarantees that when pages are added to a spread it will contain a maximum of two pages. If false, allows pages to be added or moved into existing spreads. For override information, see preserve layout when shuffling.
HorizontalOrVertical
read/write The direction of text in the column.
3 Reals (0 - 255)[] | UIColors[]
+25 more
read/write The color of the column guides, specified either as an array of three doubles, each in the range 0 to 255 and representing R, G, and B values,, or as a UI color. Can return: Array of 3 Reals (0 - 255) or UIColors enumerator.
Boolean read/write If true, locks column guides.
Boolean read/write If true, the document A-master has primary text frames when a new document is created.
Number | String unit read/write The amount to offset the bottom document bleed. Note: To set the bleed bottom offset, document bleed uniform size must be false.
Number | String unit read/write The amount to offset the inside or left document bleed. Note: To set the bleed inside or left offset, document bleed uniform size must be false.
Number | String unit read/write The amount to offset the outside or right document bleed. Note: To set the bleed outside or right offset, document bleed uniform size must be false.
Number | String unit read/write The amount to offset the top document bleed.
Boolean read/write If true, uses the document bleed top offset value for bleed offset measurements on all sides of the document. The default setting is true.
Boolean read/write If true, uses the slug top offset value for slug measurements on all sides of the document. The default value is false.
EventListeners<EventListener> readonly A collection of event listeners.
Events<Event> readonly A collection of events.
Boolean read/write If true, the document has facing pages.
DocumentIntentOptions
read/write The intent for a document.
Boolean readonly Returns true if the object specifier resolves to valid objects.
3 Reals (0 - 255)[] | UIColors[]
+25 more
read/write The color of the margin guides, specified either as an array of three doubles, each in the range 0 to 255, representing R, G, and B values, or as a UI color. Can return: Array of 3 Reals (0 - 255) or UIColors enumerator.
Boolean read/write If true, overprints black when saving the document.
PageBindingOptions
read/write The placement of the page binding.
Number | String unit read/write The height of the page.
PageOrientation
read/write The page orientation.
String read/write The size of the page.
Number | String unit read/write The width of the page.
Number 1–9999 read/write The number of pages in the document. (Range: 1 to 9999)
Application | Document readonly The parent of the DocumentPreference (a Application or Document).
Boolean read/write If true, preserves the layout of spreads that contained more than two pages when allow page shuffle was turned on. If false, changes multi-page spreads to two-page spreads if the spreads were created or changed since allow page shuffle was turned on.
Object read/write A property that allows setting of several properties at the same time.
Number | String unit read/write The amount to offset the bottom slug. Note: To set the slug bottom offset, document slug uniform size must be false.
Number | String unit read/write The amount to offset the inside or left slug. Note: To set the slug inside or left offset, document slug uniform size must be false.
Number | String unit read/write The amount to offset the outside or right slug. Note: To set the slug right or outside offset, document slug uniform size must be false.
Number | String unit read/write The amount to offset the top slug.
Boolean read/write If true, causes UI-based snippet import to use original location for page items.
Boolean read/write If true, denotes that the hidden spread is visible on document. If false, denotes that the hidden spread is not not visible on document.
Number 1–999999 read/write The starting page number for a document. This is the same as the starting page number for the first section of a document. Default value is 1.

Methods

EventListener

Adds an event listener.

eventType String The event type.
handler File | JavaScriptFunction The event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
DocumentPreference[]

Resolves the object specifier, creating an array of object references.

Boolean

Removes the event listener.

eventType String The registered event type.
handler File | JavaScriptFunction The registered event handler. Can accept: File or JavaScript Function.
captures? Boolean This parameter is obsolete.
String

Generates a string which, if executed, will return the DocumentPreference.

String

Retrieves the object specifier.

Object of 5

Properties elsewhere that hold a DocumentPreference.

Return 1

Methods that return a DocumentPreference.