InDesign2026
API 21.5.1.73
Object

MarginPreference

Margin preferences.

Preference MarginPreference
Hierarchy

Application | Document | Page

MarginPreference

Properties

NameType AccessDescription
Number | String unit read/write The bottom edge of the MarginPreference.
Number 1–216 read/write The number of columns to place on the page.
HorizontalOrVertical
read/write The direction of text in the column.
Number | String unit read/write The distance between columns.
Number[] | String[] unit read/write The distance that each column guide is placed from the left margin, formatted as an array in the format [guide1, guide2, guide3].
Boolean readonly If false, columns are evenly spaced. If true, columns can have custom widths.
EventListeners<EventListener> readonly A collection of event listeners.
Events<Event> readonly A collection of events.
Boolean readonly Returns true if the object specifier resolves to valid objects.
Number | String unit read/write The left edge of the MarginPreference.
Document | Application | Page readonly The parent of the MarginPreference (a Application, Document or Page).
Object read/write A property that allows setting of several properties at the same time.
Number | String unit read/write The right edge of the MarginPreference.
Number | String unit read/write The top edge of the MarginPreference.

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.
MarginPreference[]

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 MarginPreference.

String

Retrieves the object specifier.

Object of 6

Properties elsewhere that hold a MarginPreference.

Return 1

Methods that return a MarginPreference.