Edit in GitHubLog an issue

Button

A button.

Class

Read Only

String BEFORE_PLACE = beforePlace

Dispatched before a Button is placed. This event bubbles. This event is cancelable.


Read Only

String AFTER_PLACE = afterPlace

Dispatched after a Button is placed. This event bubbles. This event is not cancelable.

Instance

Read Only

AnchoredObjectSetting anchoredObjectSettings

Anchored object settings.


Read Only

TextWrapPreference textWrapPreferences

The text wrap preference properties that define the default formatting for wrapping text around objects.


Read Only

TimingSetting timingSettings

The object timing settings.


Read Only

XMLItem associatedXMLElement

The XML element associated with the Button.


Read Only

TransparencySetting transparencySettings

Transparency settings.


Read Only

StrokeTransparencySetting strokeTransparencySettings

Transparency settings for the stroke.


Read Only

FillTransparencySetting fillTransparencySettings

Transparency settings for the fill applied to the Button.


Read Only

ContentTransparencySetting contentTransparencySettings

Transparency settings for the content of the Button.


Read Only

LinkedPageItemOption linkedPageItemOptions

Linked Page Item options


Read Only

Boolean overridden

If true, the object originated on a master spread and was overridden. If false, the object either originated on a master spread and was not overridden, or the object did not originate on a master page.


Read Only

Mixed overriddenMasterPageItem

An object that originated on a master page and has been overridden. Can return: PageItem, Guide, Graphic, Movie or Sound.


Read Only

PageItem allPageItems

Lists all page items contained by the Button.


Read Only

Graphic allGraphics

Lists all graphics contained by the Button.


Read Only

Page parentPage

The page on which this page item appears.


Read Only

AnimationSetting animationSettings

The page item animation settings.


Read Only

Article allArticles

The list of all articles this page item is part of


Read Only

Number id

The unique ID of the Button.


Read Only

Boolean isValid

Returns true if the object specifier resolves to valid objects.


Read Only

Mixed parent

The parent of the Button (a Snippet, PlaceGun, Spread, MasterSpread, SplineItem, Polygon, GraphicLine, Rectangle, Oval, Group or Character).


Read Only

Number index

The index of the Button within its containing object.


Read Only

Preferences preferences

A collection of preferences objects.


Read Only

Ovals ovals

A collection of ellipses.


Read Only

SplineItems splineItems

The spline items collection.


Read Only

PageItems pageItems

The page items collection, which can be used to process all page items in a container (such as a document, page, or group), regardless of type.


Read Only

Rectangles rectangles

A collection of rectangles.


Read Only

GraphicLines graphicLines

A collection of graphic lines.


Read Only

TextFrames textFrames

A collection of text frames.


Read Only

Polygons polygons

A collection of polygons.


Read Only

EndnoteTextFrames endnoteTextFrames

A collection of endnote text frames.


Read Only

Paths paths

A collection of paths.


Read Only

Events events

A collection of events.


Read Only

EventListeners eventListeners

A collection of event listeners.


Read Only

Images images

A collection of bitmap images in any bitmap file format (including TIFF, JPEG, or GIF).


Read Only

Graphics graphics

A collection of imported graphics in any graphic file format (vector, metafile, or bitmap).


Read Only

EPSs epss

A collection of EPS files.


Read Only

WMFs wmfs

A collection of WMF graphics.


Read Only

PICTs picts

A collection of PICT graphics.


Read Only

PDFs pdfs

A collection of PDF files.


Read Only

Groups groups

A collection of groups.


Read Only

EPSTexts epstexts

EPSTexts


Read Only

States states

A collection of states.


Read Only

SVGs svgs

A collection of SVG files.


Read Only

Behaviors behaviors

A collection of behavior objects.


Read Only

GotoFirstPageBehaviors gotoFirstPageBehaviors

A collection of goto first page behavior objects.


Read Only

GotoLastPageBehaviors gotoLastPageBehaviors

A collection of goto last page behavior objects.


Read Only

GotoNextPageBehaviors gotoNextPageBehaviors

A collection of goto next page behavior objects.


Read Only

GotoPreviousPageBehaviors gotoPreviousPageBehaviors

A collection of goto previous page behavior objects.


Read Only

GotoNextViewBehaviors gotoNextViewBehaviors

A collection of goto next view behavior objects.


Read Only

GotoPreviousViewBehaviors gotoPreviousViewBehaviors

A collection of goto previous view behavior objects.


Read Only

GotoURLBehaviors gotoURLBehaviors

A collection of goto URL behavior objects.


Read Only

GotoAnchorBehaviors gotoAnchorBehaviors

A collection of goto anchor behavior objects.


Read Only

MovieBehaviors movieBehaviors

A collection of movie behavior objects.


Read Only

SoundBehaviors soundBehaviors

A collection of sound behavior objects.


Read Only

ShowHideFieldsBehaviors showHideFieldsBehaviors

A collection of show/hide fields behavior objects.


Read Only

OpenFileBehaviors openFileBehaviors

A collection of open file behavior objects.


Read Only

ViewZoomBehaviors viewZoomBehaviors

A collection of view zoom behavior objects.


Read Only

SubmitFormBehaviors submitFormBehaviors

A collection of submit form behavior objects.


Read Only

ClearFormBehaviors clearFormBehaviors

A collection of clear form behavior objects.


Read Only

PrintFormBehaviors printFormBehaviors

A collection of print form behavior objects.


Read Only

AnimationBehaviors animationBehaviors

A collection of animation behaviors.


Read Only

GotoNextStateBehaviors gotoNextStateBehaviors

A collection of goto next state behaviors.


Read Only

GotoPreviousStateBehaviors gotoPreviousStateBehaviors

A collection of goto previous state behaviors.


Read Only

GotoStateBehaviors gotoStateBehaviors

A collection of goto state behaviors.


Read Only

GotoPageBehaviors gotoPageBehaviors

A collection of go to page behavior objects.


Boolean printableInPdf

If true, the form field/push button is printable in the exported PDF.


Boolean hiddenUntilTriggered

If true, the form field/push button is hidden until triggered in the exported PDF.


Number activeStateIndex

The index of the active state in the object's states collection.


String name

The name of the Button.


String description

The description of the Button.


Boolean allowOverrides

If true, the master page item can be overridden.


DimensionsConstraints horizontalLayoutConstraints

The left margin, width, and right margin constraints this item is subject to when using the object-based layout rule.


DimensionsConstraints verticalLayoutConstraints

The top margin, height, and bottom margin constraints this item is subject to when using the object-based layout rule.


Measurement Unit (Number or String)=any geometricBounds

The bounds of the Button excluding the stroke width, in the format [y1, x1, y2, x2], which give the coordinates of the top-left and bottom-right corners of the bounding box.


Measurement Unit (Number or String)=any visibleBounds

The bounds of the Button including the stroke width, in the format [y1, x1, y2, x2], which give the coordinates of the top-left and bottom-right corners of the bounding box.


Swatch fillColor

The swatch (color, gradient, tint, or mixed ink) applied to the fill of the Button. . Can also accept: String.


Number fillTint

The percent of tint to use in the Button's fill color. (To specify a tint percent, use a number in the range of 0 to 100; to use the inherited or overridden value, use -1.)


Boolean overprintFill

If true, the Button's fill color overprints any underlying objects. If false, the fill color knocks out the underlying colors.


Measurement Unit (Number or String)=any strokeWeight

The weight (in points) to apply to the Button's stroke.


Number miterLimit

The limit of the ratio of stroke width to miter length before a miter (pointed) join becomes a bevel (squared-off) join.


EndCap endCap

The end shape of an open path.


EndJoin endJoin

The corner join applied to the Button.


StrokeStyle strokeType

The name of the stroke style to apply. Can also accept: String.


StrokeCornerAdjustment strokeCornerAdjustment

The corner adjustment applied to the Button.


Measurement Unit (Number or String)=any strokeDashAndGap

The dash and gap measurements that define the pattern of a custom dashed line. Define up to six values (in points) in the format [dash1, gap1, dash2, gap2, dash3, gap3].


ArrowHead leftLineEnd

The arrowhead applied to the start of the path.


ArrowHead rightLineEnd

The arrowhead applied to the end of the path.


Swatch strokeColor

The swatch (color, gradient, tint, or mixed ink) applied to the stroke of the Button. Can also accept: String.


Number strokeTint

The percent of tint to use in object's stroke color. (To specify a tint percent, use a number in the range of 0 to 100; to use the inherited or overridden value, use -1.)


Measurement Unit (Number or String)=any gradientFillStart

The starting point (in page coordinates) of a gradient applied to the fill of the Button, in the format [x, y].


Measurement Unit (Number or String)=any gradientFillLength

The length (for a linear gradient) or radius (for a radial gradient) applied to the fill of the Button.


Number gradientFillAngle

The angle of a linear gradient applied to the fill of the Button. (Range: -180 to 180)


Measurement Unit (Number or String)=any gradientStrokeStart

The starting point (in page coordinates) of a gradient applied to the stroke of the Button, in the format [x, y].


Measurement Unit (Number or String)=any gradientStrokeLength

The length (for a linear gradient) or radius (for a radial gradient) applied to the stroke of the Button.


Number gradientStrokeAngle

The angle of a linear gradient applied to the stroke of the Button. (Range: -180 to 180)


Boolean overprintStroke

If true, the Button's stroke color overprints any underlying objects. If false, the stroke color knocks out the underlying colors.


Swatch gapColor

The swatch (color, gradient, tint, or mixed ink) applied to the gap of a dashed, dotted, or striped stroke. For information, see stroke type.


Number gapTint

The tint as a percentage of the gap color. (To specify a tint percent, use a number in the range of 0 to 100; to use the inherited or overridden value, use -1.)


Boolean overprintGap

If true, the gap color overprints any underlying colors. If false, the gap color knocks out the underlying colors.


StrokeAlignment strokeAlignment

The stroke alignment applied to the Button.


Boolean nonprinting

If true, the Button does not print.


Layer itemLayer

The layer that the Button is on.


Boolean locked

If true, the Button is locked.


DisplaySettingOptions localDisplaySetting

Display performance options for the Button.


Number rotationAngle

The rotatation angle of the Button. (Range: -360 to 360)


Number shearAngle

The skewing angle applied to the Button. (Range: -360 to 360)


Number horizontalScale

The horizontal scaling applied to the Button.


Number verticalScale

The vertical scaling applied to the Button.


Number absoluteRotationAngle

The rotation angle of the Button relative to its containing object. (Range: -360 to 360)


Number absoluteShearAngle

The skewing angle of the Button relative to its containing object. (Range: -360 to 360)


Number absoluteHorizontalScale

The horizontal scale of the Button relative to its containing object.


Number absoluteVerticalScale

The vertical scale of the Button relative to its containing object.


ObjectStyle appliedObjectStyle

The object style applied to the Button.


Flip flip

The direction in which to flip the printed image.


Flip absoluteFlip

Indicates whether the Button has been flipped independently of its parent object and, if yes, the direction in which the Button was flipped.


Boolean visible

If true, the Button is visible.


CornerOptions topLeftCornerOption

The shape to be applied to the top left corner of rectangular shapes and all corners of non-rectangular shapes.Note: corner option differs from end join in which you can set a radius for a corner option, whereas the rounded or beveled effect of an end join depends on the stroke weight.


CornerOptions topRightCornerOption

The shape to apply to the top right corner of rectangular shapes


CornerOptions bottomLeftCornerOption

The shape to apply to the bottom left corner of rectangular shapes.


CornerOptions bottomRightCornerOption

The shape to apply to the bottom right corner of rectangular shapes.


Measurement Unit (Number or String)=any topLeftCornerRadius

The radius in measurement units of the corner effect applied to the top left corner of rectangular shapes and all corners of non-rectangular shapes


Measurement Unit (Number or String)=any topRightCornerRadius

The radius in measurement units of the corner effect applied to the top right corner of rectangular shapes


Measurement Unit (Number or String)=any bottomLeftCornerRadius

The radius in measurement units of the corner effect applied to the bottom left corner of rectangular shapes


Measurement Unit (Number or String)=any bottomRightCornerRadius

The radius in measurement units of the corner effect applied to the bottom right corner of rectangular shapes


ArrowHeadAlignmentEnum arrowHeadAlignment

The arrowhead alignment applied to the Button.


Number leftArrowHeadScale

The scaling applied to the arrowhead at the start of the path. (Range: 1 to 1000)


Number rightArrowHeadScale

The scaling applied to the arrowhead at the end of the path. (Range: 1 to 1000)


String label

A property that can be set to any string.


Object properties

A property that allows setting of several properties at the same time.

Methods

bringToFront( PageItem reference )

Brings the Button to the front of its layer or in front of a particular item.

Parameters

TypeNameDescription
PageItem
reference
The reference object to bring the object in front of (must have same parent) (Optional)

sendToBack( PageItem reference )

Sends the Button to the back of its layer or behind a particular item (must have same parent).

Parameters

TypeNameDescription
PageItem
reference
The reference object to send the object behind (Optional)

bringForward()

Brings the Button forward one level in its layer.


sendBackward()

Sends the Button back one level in its layer.


convertShape( ConvertShapeOptions given, Number numberOfSides, Number insetPercentage, Measurement Unit (Number or String)=any cornerRadius )

Converts the Button to a different shape.

Parameters

TypeNameDescription
ConvertShapeOptions
given
The Button's new shape.
Number
numberOfSides
The number of sides for the resulting polygon. (Range: 3 to 100) (Optional)
Number
insetPercentage
The star inset percentage for the resulting polygon. (Range: 0.0 to 100.0) (Optional)
Measurement Unit (Number or String)=any
cornerRadius
The corner radius of the resulting rectangle. (Optional)

convertToObject()

Converts the button object to the page item currently in the active state. Page items from other states will be lost.


Asset store( Library using, Object withProperties )

Stores the object in the specified library.

Parameters

TypeNameDescription
Library
using
The library in which to store the object.
Object
withProperties
Initial values for properties of the new Button (Optional)

insertLabel( String key, String value )

Sets the label to the value associated with the specified key.

Parameters

TypeNameDescription
String
key
The key.
String
value
The value.

placeXML( XMLElement using )

Places XML content into the specified object. Note: Replaces any existing content.

Parameters

TypeNameDescription
XMLElement
using
The XML element whose content you want to place.

autoTag()

Tag the object or the parent story using default tags defined in XML preference.


markup( XMLElement using )

Associates the page item with the specified XML element while preserving existing content.

Parameters

TypeNameDescription
XMLElement
using
The XML element.

PageItem findObject( Boolean reverseOrder )

Finds objects that match the find what value.

Parameters

TypeNameDescription
Boolean
reverseOrder
If true, returns the results in reverse order. (Optional)

PageItem changeObject( Boolean reverseOrder )

Finds objects that match the find what value and replace the objects with the change to value.

Parameters

TypeNameDescription
Boolean
reverseOrder
If true, returns the results in reverse order. (Optional)

Mixed override( Page destinationPage )

Overrides a master page item and places the item on the document page as a new object.

Parameters

TypeNameDescription
Page
destinationPage
The document page that contains the master page item to override.

removeOverride()

Removes the override from a previously overridden master page item.


detach()

Detaches an overridden master page item from the master page.


remove()

Deletes the Button.


fit( FitOptions given )

Applies the specified fit option to content in a frame.

Parameters

TypeNameDescription
FitOptions
given
The fit option to use.

flipItem( Flip given, Mixed around )

Flips the Button.

Parameters

TypeNameDescription
Flip
given
The axis around which to flip the Button.
Mixed
around
The point around which to flip the Button. Can accept: Array of 2 Units or AnchorPoint enumerator. (Optional)

PageItem duplicate( Mixed to, Measurement Unit (Number or String)=any by )

Duplicates the Button at the specified location or offset.

Parameters

TypeNameDescription
Mixed
to
The location of the new Button, specified in coordinates in the format [x, y]. Can accept: Array of 2 Units, Spread, Page or Layer. (Optional)
Measurement Unit (Number or String)=any
by
Amount by which to offset the new Button from the original Button's position. (Optional)

move( Mixed to, Measurement Unit (Number or String)=any by )

Moves the Button to a new location. Note: Either the 'to' or 'by' parameter is required; if both parameters are defined, only the to value is used.

Parameters

TypeNameDescription
Mixed
to
The new location of the Button,in the format (x, y). Can accept: Array of 2 Units, Spread, Page or Layer. (Optional)
Measurement Unit (Number or String)=any
by
The amount (in measurement units) to move the Button relative to its current position, in the format (x, y). (Optional)

applyObjectStyle( ObjectStyle using, Boolean clearingOverrides, Boolean clearingOverridesThroughRootObjectStyle )

Applies the specified object style.

Parameters

TypeNameDescription
ObjectStyle
using
The object style to apply.
Boolean
clearingOverrides
If true, clears the Button's existing attributes before applying the style. (Optional)
Boolean
clearingOverridesThroughRootObjectStyle
If true, clears attributes and formatting applied to the Button that are not defined in the object style. (Optional)

clearObjectStyleOverrides()

Clear overrides for object style


clearTransformations()

Clears transformations from the Button. Transformations include rotation, scaling, flipping, fitting, and shearing.


transform( CoordinateSpaces in, Mixed from, Mixed withMatrix, Mixed replacingCurrent, Boolean consideringRulerUnits )

Transform the page item.

Parameters

TypeNameDescription
CoordinateSpaces
in
The coordinate space to use
Mixed
from
The temporary origin during the transformation. Can accept: Array of 2 Reals, AnchorPoint enumerator or Array of Arrays of 2 Reals, CoordinateSpaces enumerators, AnchorPoint enumerators, BoundingBoxLimits enumerators or Long Integers.
Mixed
withMatrix
Transform matrix. Can accept: Array of 6 Reals or TransformationMatrix.
Mixed
replacingCurrent
Transform components to consider; providing this optional parameter causes the target's existing transform components to be replaced with new values. Without this parameter, the given matrix is concatenated onto the target's existing transform combining the effect of the two. Can accept: MatrixContent enumerator, Array of MatrixContent enumerators or Long Integer. (Optional)
Boolean
consideringRulerUnits
If true then a ruler based origin is interpreted using ruler units rather than points. The default value is false. This parameter has no effect unless the reference point is specified relative to a page. (Optional)

TransformationMatrix transformValuesOf( CoordinateSpaces in )

Get the transformation values of the page item.

Parameters

TypeNameDescription
CoordinateSpaces
in
The coordinate space to use

Mixed resolve( Mixed location, CoordinateSpaces in, Boolean consideringRulerUnits )

Get the coordinates of the given location in the specified coordinate system.

Parameters

TypeNameDescription
Mixed
location
The location requested. Can accept: Array of 2 Reals, AnchorPoint enumerator or Array of Arrays of 2 Reals, CoordinateSpaces enumerators, AnchorPoint enumerators, BoundingBoxLimits enumerators or Long Integers.
CoordinateSpaces
in
The coordinate space to use.
Boolean
consideringRulerUnits
If true then a ruler location is interpreted using ruler units rather than points. The default value is false. This parameter has no effect unless the reference point is specified relative to a page. (Optional)

redefineScaling( Number to )

Apply an item's scaling to its content if possible.

Parameters

TypeNameDescription
Number
to
The scale factors to be left on the item. The default is {1.0, 1.0}. (Optional)

resize( Mixed in, Mixed from, ResizeMethods by, Mixed values, Boolean resizeIndividually, Boolean consideringRulerUnits )

Resize the page item.

Parameters

TypeNameDescription
Mixed
in
The bounding box to resize. Can accept: CoordinateSpaces enumerator, BoundingBoxLimits enumerator or Ordered array containing coordinateSpace:CoordinateSpaces enumerator, boundsKind:BoundingBoxLimits enumerator.
Mixed
from
The transform origin. Legal specifications: relative to bounding box: anchor
ResizeMethods
by
How the current dimensions are affected by the given values
Mixed
values
The width and height values. Legal dimensions specifications: {x, y [, coordinate space]}, {x, resize constraint [, coordinate space]}, or {resize constraint, y [, coordinate space]}; where x and y are real numbers and coordinate space is used to determine only the unit of length for x and y; coordinate space is ignored for the 'current dimensions times' resize method). Can accept: Array of Reals, ResizeConstraints enumerators or CoordinateSpaces enumerators.
Boolean
resizeIndividually
If false and multiple page items are targeted, the new dimensions are attained only by moving the individual items rather than resizing them. (Optional)
Boolean
consideringRulerUnits
If true then a ruler location is interpreted using ruler units rather than points. The default value is false. This parameter has no effect unless the reference point is specified relative to a page. (Optional)

reframe( Mixed in, Mixed opposingCorners )

Move the bounding box of the page item

Parameters

TypeNameDescription
Mixed
in
The bounding box to resize. Can accept: CoordinateSpaces enumerator or Ordered array containing coordinateSpace:CoordinateSpaces enumerator, boundsKind:BoundingBoxLimits enumerator.
Mixed
opposingCorners
Opposing corners of new bounding box in the given coordinate space

String transformAgain()

Transforms the Button using the last transformation performed on any object. Transformations include moving, rotating, shearing, scaling, and flipping.


String transformSequenceAgain()

Transforms the Button using the last sequence of transform operations performed on any single object or performed at the same time on any group of objects. Transformations include moving, rotating, shearing, scaling, and flipping.


String transformAgainIndividually()

Transforms the Button using the last transformation performed on any Button. Transformations include moving, rotating, shearing, scaling, and flipping.


String transformSequenceAgainIndividually()

Transforms the Button using the last sequence of transformations performed on any single object or performed at the same time on any group of objects. Transformations include moving, rotating, shearing, scaling, and flipping.


createPlainTextQRCode( String plainText, Mixed qrCodeSwatch, String withProperties )

Create Plain Text QR Code on the page item

Parameters

TypeNameDescription
String
plainText
QR code Plain Text (Optional)
Mixed
qrCodeSwatch
Swatch to be applied on generated QR Code Graphic . Can accept: Swatch or String. (Optional)
String
withProperties
Initial values for properties of the new Button. Above parameters can also be passed as properties (Optional)

createHyperlinkQRCode( String urlLink, Mixed qrCodeSwatch, String withProperties )

Create Hyperlink QR Code on the page item or document

Parameters

TypeNameDescription
String
urlLink
QR code Hyperlink URL (Optional)
Mixed
qrCodeSwatch
Swatch to be applied on generated QR Code Graphic . Can accept: Swatch or String. (Optional)
String
withProperties
Initial values for properties of the new Button. Above parameters can also be passed as properties (Optional)

createTextMsgQRCode( String cellNumber, String textMessage, Mixed qrCodeSwatch, String withProperties )

Create Text Msg QR Code on the page item or document

Parameters

TypeNameDescription
String
cellNumber
QR code Text Phone Number (Optional)
String
textMessage
QR code Text Message (Optional)
Mixed
qrCodeSwatch
Swatch to be applied on generated QR Code Graphic . Can accept: Swatch or String. (Optional)
String
withProperties
Initial values for properties of the new Button. Above parameters can also be passed as properties (Optional)

createEmailQRCode( String emailAddress, String subject, String body, Mixed qrCodeSwatch, String withProperties )

Create Email QR Code on the page item or document

Parameters

TypeNameDescription
String
emailAddress
QR code Email Address (Optional)
String
subject
QR code Email Subject (Optional)
String
body
QR code Email Body Message (Optional)
Mixed
qrCodeSwatch
Swatch to be applied on generated QR Code Graphic . Can accept: Swatch or String. (Optional)
String
withProperties
Initial values for properties of the new Button. Above parameters can also be passed as properties (Optional)

createVCardQRCode( String firstName, String lastName, String jobTitle, String cellPhone, String phone, String email, String organisation, String streetAddress, String city, String adrState, String country, String postalCode, String website, Mixed qrCodeSwatch, String withProperties )

Create Business Card QR Code on the page item or load on document's placegun

Parameters

TypeNameDescription
String
firstName
QR code Business Card First Name (Optional)
String
lastName
QR code Business Card Last Name (Optional)
String
jobTitle
QR code Business Card Title (Optional)
String
cellPhone
QR code Business Card Cell Phone Number (Optional)
String
phone
QR code Business Card Phone Number (Optional)
String
email
QR code Business Card Email Address (Optional)
String
organisation
QR code Business Card Organisation (Optional)
String
streetAddress
QR code Business Card Street Address (Optional)
String
city
QR code Business Card City (Optional)
String
adrState
QR code Business Card State (Optional)
String
country
QR code Business Card Country (Optional)
String
postalCode
QR code Business Card Postal Code (Optional)
String
website
QR code Business Card URL (Optional)
Mixed
qrCodeSwatch
Swatch to be applied on generated QR Code Graphic . Can accept: Swatch or String. (Optional)
String
withProperties
Initial values for properties of the new Button. Above parameters can also be passed as properties (Optional)

exportFile( Mixed format, File to, Boolean showingOptions, PDFExportPreset using, String versionComments, Boolean forceSave )

Exports the object(s) to a file.

Parameters

TypeNameDescription
Mixed
format
The export format, specified as an enumeration value or as an extension that appears in the Save as type or Format menu in the Export dialog. Can accept: ExportFormat enumerator or String.
File
to
The path to the export file.
Boolean
showingOptions
If true, displays the export options dialog. (Optional)
PDFExportPreset
using
The export style. (Optional)
String
versionComments
The comment for this version. (Optional)
Boolean
forceSave
If true, forcibly saves a version. (Optional)

BackgroundTask asynchronousExportFile( Mixed format, File to, Boolean showingOptions, PDFExportPreset using, String versionComments, Boolean forceSave )

asynchronously exports the object(s) to a file.

Parameters

TypeNameDescription
Mixed
format
The export format, specified as an enumeration value or as an extension that appears in the Save as type or Format menu in the Export dialog. Can accept: ExportFormat enumerator or String.
File
to
The path to the export file.
Boolean
showingOptions
If true, displays the export options dialog. (Optional)
PDFExportPreset
using
The export style. (Optional)
String
versionComments
The comment for this version. (Optional)
Boolean
forceSave
If true, forcibly saves a version. (Optional)

Mixed contentPlace( PageItem pageItems, Boolean linkPageItems, Boolean linkStories, Boolean mapStyles, Boolean showingOptions )

Duplicate an object and place it into the target page item.

Parameters

TypeNameDescription
PageItem
pageItems
One or more page items to place or load
Boolean
linkPageItems
Whether to link pageItems in content placer (if true it will override link stories value) (Optional)
Boolean
linkStories
Whether to link stories in content placer (only applicable for single story, pageItem links will also be created in case of more than one item) (Optional)
Boolean
mapStyles
Whether to map styles in content placer (Optional)
Boolean
showingOptions
Whether to display the link options dialog (Optional)

select( SelectionOptions existingSelection )

Selects the object.

Parameters

TypeNameDescription
SelectionOptions
existingSelection
The selection status of the Button in relation to previously selected objects. (Optional)

String extractLabel( String key )

Gets the label value associated with the specified key.

Parameters

TypeNameDescription
String
key
The key.

String toSource()

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


Button getElements()

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


String toSpecifier()

Retrieves the object specifier.


EventListener addEventListener( String eventType, Mixed handler, Boolean captures )

Adds an event listener.

Parameters

TypeNameDescription
String
eventType
The event type.
Mixed
handler
The event handler. Can accept: File or JavaScript Function.
Boolean
captures
This parameter is obsolete. (Optional)

Boolean removeEventListener( String eventType, Mixed handler, Boolean captures )

Removes the event listener.

Parameters

TypeNameDescription
String
eventType
The registered event type.
Mixed
handler
The registered event handler. Can accept: File or JavaScript Function.
Boolean
captures
This parameter is obsolete. (Optional)
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2023 Adobe. All rights reserved.