GraphicLine
A straight line consisting of two points.
Class
Read Only
String BEFORE_PLACE = beforePlace
Dispatched before a GraphicLine is placed. This event bubbles. This event is cancelable.
Read Only
String AFTER_PLACE = afterPlace
Dispatched after a GraphicLine is placed. This event bubbles. This event is not cancelable.
Instance
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 GraphicLine.
Read Only
ContentTransparencySetting contentTransparencySettings
Transparency settings for the content of the GraphicLine.
Read Only
TextWrapPreference textWrapPreferences
The text wrap preference properties that define the default formatting for wrapping text around objects.
Read Only
LockStateValues lockState
The lock state.
Read Only
AnchoredObjectSetting anchoredObjectSettings
Anchored object settings.
Read Only
ObjectExportOption objectExportOptions
Export options for the object
Read Only
XMLItem associatedXMLElement
The XML element associated with the GraphicLine.
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 GraphicLine.
Read Only
Graphic allGraphics
Lists all graphics contained by the GraphicLine.
Read Only
Page parentPage
The page on which this page item appears.
Read Only
AnimationSetting animationSettings
The page item animation settings.
Read Only
TimingSetting timingSettings
The object timing 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 GraphicLine.
Read Only
Boolean isValid
Returns true if the object specifier resolves to valid objects.
Read Only
Mixed parent
The parent of the GraphicLine (a Snippet, ComboBox, ListBox, TextBox, SignatureField, Spread, MasterSpread, SplineItem, Polygon, GraphicLine, Rectangle, Oval, Group, State, Cell, Character or PlaceGun).
Read Only
Number index
The index of the GraphicLine 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
Sounds sounds
A collection of sound clips.
Read Only
MediaItems mediaItems
The media items collection.
Read Only
Events events
A collection of events.
Read Only
EventListeners eventListeners
A collection of event listeners.
Read Only
TextPaths textPaths
A collection of text paths.
Read Only
Movies movies
A collection of movies.
Read Only
HtmlItems htmlItems
A collection of embedded HTML page items.
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
FormFields formFields
A collection of form fields.
Read Only
Buttons buttons
A collection of buttons.
Read Only
MultiStateObjects multiStateObjects
A collection of multi-state objects.
Read Only
CheckBoxes checkBoxes
A collection of checkboxes.
Read Only
ComboBoxes comboBoxes
A collection of comboboxes.
Read Only
ListBoxes listBoxes
A collection of listboxes.
Read Only
RadioButtons radioButtons
A collection of radio buttons.
Read Only
TextBoxes textBoxes
A collection of text boxes.
Read Only
SignatureFields signatureFields
A collection of signature fields.
Read Only
SVGs svgs
A collection of SVG files.
Read Only
ImportedPages importedPages
Imported InDesign pages.
ContentType contentType
The type of content that a frame can contain.
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 GraphicLine 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 GraphicLine 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 GraphicLine. . Can also accept: String.
Number fillTint
The percent of tint to use in the GraphicLine'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 GraphicLine'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 GraphicLine'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 GraphicLine.
StrokeStyle strokeType
The name of the stroke style to apply. Can also accept: String.
StrokeCornerAdjustment strokeCornerAdjustment
The corner adjustment applied to the GraphicLine.
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 GraphicLine. 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 GraphicLine, 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 GraphicLine.
Number gradientFillAngle
The angle of a linear gradient applied to the fill of the GraphicLine. (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 GraphicLine, 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 GraphicLine.
Number gradientStrokeAngle
The angle of a linear gradient applied to the stroke of the GraphicLine. (Range: -180 to 180)
Boolean overprintStroke
If true, the GraphicLine'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 GraphicLine.
Boolean nonprinting
If true, the GraphicLine does not print.
Layer itemLayer
The layer that the GraphicLine is on.
Boolean locked
If true, the GraphicLine is locked.
DisplaySettingOptions localDisplaySetting
Display performance options for the GraphicLine.
Number rotationAngle
The rotatation angle of the GraphicLine. (Range: -360 to 360)
Number shearAngle
The skewing angle applied to the GraphicLine. (Range: -360 to 360)
Number horizontalScale
The horizontal scaling applied to the GraphicLine.
Number verticalScale
The vertical scaling applied to the GraphicLine.
Number absoluteRotationAngle
The rotation angle of the GraphicLine relative to its containing object. (Range: -360 to 360)
Number absoluteShearAngle
The skewing angle of the GraphicLine relative to its containing object. (Range: -360 to 360)
Number absoluteHorizontalScale
The horizontal scale of the GraphicLine relative to its containing object.
Number absoluteVerticalScale
The vertical scale of the GraphicLine relative to its containing object.
ObjectStyle appliedObjectStyle
The object style applied to the GraphicLine.
Flip flip
The direction in which to flip the printed image.
Flip absoluteFlip
Indicates whether the GraphicLine has been flipped independently of its parent object and, if yes, the direction in which the GraphicLine was flipped.
Boolean visible
If true, the GraphicLine is visible.
String name
The name of the GraphicLine.
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 GraphicLine.
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
PageItem findObject( Boolean reverseOrder )
Finds objects that match the find what value.
Parameters
Type Name Description 
PageItem changeObject( Boolean reverseOrder )
Finds objects that match the find what value and replace the objects with the change to value.
Parameters
Type Name Description 
Boolean checkOut()
Checks out the story.
Boolean checkIn( String versionComments, Boolean forceSave )
Checks in the story or stories.
Parameters
Type Name Description 
Boolean revert()
Reverts the document to its state at the last save operation.
bringToFront( PageItem reference )
Brings the GraphicLine to the front of its layer or in front of a particular item.
Parameters
Type Name Description 
sendToBack( PageItem reference )
Sends the GraphicLine to the back of its layer or behind a particular item (must have same parent).
Parameters
Type Name Description 
bringForward()
Brings the GraphicLine forward one level in its layer.
sendBackward()
Sends the GraphicLine back one level in its layer.
PageItem makeCompoundPath( PageItem with )
Creates a compound path by combining the path(s) of the GraphicLine with the paths of other objects.
Parameters
Type Name Description 
PageItem releaseCompoundPath()
Releases a compound path.
PageItem intersectPath( PageItem with )
Creates a new page item by intersecting the GraphicLine with other objects. Returns an error if the objects do not intersect.
Parameters
Type Name Description 
PageItem addPath( PageItem with )
Creates a new page item by combining the GraphicLine with other objects. Deletes the objects if they do not intersect.
Parameters
Type Name Description 
PageItem subtractPath( PageItem with )
Creates a new page item by subtracting the overlapping areas of the GraphicLine and other objects.
Parameters
Type Name Description 
PageItem minusBack( PageItem with )
Creates a new page item by reverse subtracting the overlapping areas of the GraphicLine and other objects.
Parameters
Type Name Description 
PageItem excludeOverlapPath( PageItem with )
Creates a new page item by excluding the overlapping areas of the GraphicLine and other objects.
Parameters
Type Name Description 
convertShape( ConvertShapeOptions given, Number numberOfSides, Number insetPercentage, Measurement Unit (Number or String)=any cornerRadius )
Converts the GraphicLine to a different shape.
Parameters
Type Name Description 
Asset store( Library using, Object withProperties )
Stores the object in the specified library.
Parameters
Type Name Description 
insertLabel( String key, String value )
Sets the label to the value associated with the specified key.
Parameters
Type Name Description 
placeXML( XMLElement using )
Places XML content into the specified object. Note: Replaces any existing content.
Parameters
Type Name Description 
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
Type Name Description 
Mixed place( File fileName, Boolean showingOptions, Object withProperties )
Places the file.
Parameters
Type Name Description 
Mixed override( Page destinationPage )
Overrides a master page item and places the item on the document page as a new object.
Parameters
Type Name Description 
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 GraphicLine.
fit( FitOptions given )
Applies the specified fit option to content in a frame.
Parameters
Type Name Description 
flipItem( Flip given, Mixed around )
Flips the GraphicLine.
Parameters
Type Name Description 
PageItem duplicate( Mixed to, Measurement Unit (Number or String)=any by )
Duplicates the GraphicLine at the specified location or offset.
Parameters
Type Name Description 
move( Mixed to, Measurement Unit (Number or String)=any by )
Moves the GraphicLine 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
Type Name Description 
applyObjectStyle( ObjectStyle using, Boolean clearingOverrides, Boolean clearingOverridesThroughRootObjectStyle )
Applies the specified object style.
Parameters
Type Name Description 
clearObjectStyleOverrides()
Clear overrides for object style
clearTransformations()
Clears transformations from the GraphicLine. Transformations include rotation, scaling, flipping, fitting, and shearing.
transform( CoordinateSpaces in, Mixed from, Mixed withMatrix, Mixed replacingCurrent, Boolean consideringRulerUnits )
Transform the page item.
Parameters
Type Name Description 
TransformationMatrix transformValuesOf( CoordinateSpaces in )
Get the transformation values of the page item.
Parameters
Type Name Description 
Mixed resolve( Mixed location, CoordinateSpaces in, Boolean consideringRulerUnits )
Get the coordinates of the given location in the specified coordinate system.
Parameters
Type Name Description 
redefineScaling( Number to )
Apply an item's scaling to its content if possible.
Parameters
Type Name Description 
resize( Mixed in, Mixed from, ResizeMethods by, Mixed values, Boolean resizeIndividually, Boolean consideringRulerUnits )
Resize the page item.
Parameters
Type Name Description 
reframe( Mixed in, Mixed opposingCorners )
Move the bounding box of the page item
Parameters
Type Name Description 
String transformAgain()
Transforms the GraphicLine using the last transformation performed on any object. Transformations include moving, rotating, shearing, scaling, and flipping.
String transformSequenceAgain()
Transforms the GraphicLine 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 GraphicLine using the last transformation performed on any GraphicLine. Transformations include moving, rotating, shearing, scaling, and flipping.
String transformSequenceAgainIndividually()
Transforms the GraphicLine 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
Type Name Description 
createHyperlinkQRCode( String urlLink, Mixed qrCodeSwatch, String withProperties )
Create Hyperlink QR Code on the page item or document
Parameters
Type Name Description 
createTextMsgQRCode( String cellNumber, String textMessage, Mixed qrCodeSwatch, String withProperties )
Create Text Msg QR Code on the page item or document
Parameters
Type Name Description 
createEmailQRCode( String emailAddress, String subject, String body, Mixed qrCodeSwatch, String withProperties )
Create Email QR Code on the page item or document
Parameters
Type Name Description 
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
Type Name Description 
exportFile( Mixed format, File to, Boolean showingOptions, PDFExportPreset using, String versionComments, Boolean forceSave )
Exports the object(s) to a file.
Parameters
Type Name Description 
BackgroundTask asynchronousExportFile( Mixed format, File to, Boolean showingOptions, PDFExportPreset using, String versionComments, Boolean forceSave )
asynchronously exports the object(s) to a file.
Parameters
Type Name Description 
Mixed contentPlace( PageItem pageItems, Boolean linkPageItems, Boolean linkStories, Boolean mapStyles, Boolean showingOptions )
Duplicate an object and place it into the target page item.
Parameters
Type Name Description 
select( SelectionOptions existingSelection )
Selects the object.
Parameters
Type Name Description 
String extractLabel( String key )
Gets the label value associated with the specified key.
Parameters
Type Name Description 
String toSource()
Generates a string which, if executed, will return the GraphicLine.
GraphicLine 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
Type Name Description 
Boolean removeEventListener( String eventType, Mixed handler, Boolean captures )
Removes the event listener.
Parameters
Type Name Description