Slides Service

Slides

This service allows scripts to create, access, and modify Google Slides files. See also the Google Slides documentation for more details on the underlying features of the Slides service.

Classes

NameBrief description
AffineTransformA 3x3 matrix used to transform source coordinates (x1, y1) into destination coordinates (x2, y2) according to matrix multiplication:
[ x2 ]   [ scaleX shearX translateX ] [ x1 ]
[ y2 ] = [ shearY scaleY translateY ] [ y1 ]
[ 1  ]   [   0      0        1      ] [ 1  ]
AffineTransformBuilderA builder for AffineTransform objects.
AlignmentPositionThe alignment position to apply.
ArrowStyleThe kinds of start and end forms with which linear geometry can be rendered.
AutoTextAn element of text that is dynamically replaced with content that can change over time, such as a slide number.
AutoTextTypeThe types of auto text.
AutofitDescribes the autofit settings of a shape.
AutofitTypeThe autofit types.
BorderDescribes the border around an element.
CellMergeStateThe table cell merge states.
ColorAn opaque color
ColorSchemeA color scheme defines a mapping from members of ThemeColorType to the actual colors used to render them.
ConnectionSiteThe connection site on a PageElement that can connect to a connector.
ContentAlignmentThe content alignments for a Shape or TableCell.
DashStyleThe kinds of dashes with which linear geometry can be rendered.
FillDescribes the page element's background
FillTypeThe kinds of fill.
GroupA collection of PageElements joined as a single unit.
ImageA PageElement representing an image.
LayoutA layout in a presentation.
LineA PageElement representing a line.
LineCategoryThe line category.
LineFillDescribes the fill of a line or outline
LineFillTypeThe kinds of line fill.
LineTypeThe line types.
LinkA hypertext link.
LinkTypeThe types of a Link.
ListA list in the text.
ListPresetPreset patterns of glyphs for lists in text.
ListStyleThe list styling for a range of text.
MasterA master in a presentation.
NotesMasterA notes master in a presentation.
NotesPageA notes page in a presentation.
PageA page in a presentation.
PageBackgroundDescribes the page's background
PageBackgroundTypeThe kinds of page backgrounds.
PageElementA visual element rendered on a page.
PageElementRangeA collection of one or more PageElement instances.
PageElementTypeThe page element type.
PageRangeA collection of one or more Page instances.
PageTypeThe page types.
ParagraphA segment of text terminated by a newline character.
ParagraphAlignmentThe types of text alignment for a paragraph.
ParagraphStyleThe styles of text that apply to entire paragraphs.
PictureFillA fill that renders an image that's stretched to the dimensions of its container.
PlaceholderTypeThe placeholder types.
PointA point representing a location.
PredefinedLayoutPredefined layouts.
PresentationA presentation.
SelectionThe user's selection in the active presentation.
SelectionTypeType of Selection.
ShapeA PageElement representing a generic shape that does not have a more specific classification.
ShapeTypeThe shape types.
SheetsChartA PageElement representing a linked chart embedded from Google Sheets.
SheetsChartEmbedTypeThe Sheets chart's embed type.
SlideA slide in a presentation.
SlideLinkingModeThe mode of links between slides.
SlidePositionThe relative position of a Slide.
SlidesAppCreates and opens Presentations that can be edited.
SolidFillA solid color fill.
SpacingModeThe different modes for paragraph spacing.
SpeakerSpotlightA PageElement representing a speaker spotlight.
TableA PageElement representing a table.
TableCellA cell in a table.
TableCellRangeA collection of one or more TableCell instances.
TableColumnA column in a table.
TableRowA row in a table.
TextBaselineOffsetThe text vertical offset from its normal position.
TextDirectionThe directions text can flow in.
TextRangeA segment of the text contents of a Shape or a TableCell.
TextStyleThe style of text.
ThemeColorA color that refers to an entry in the page's ColorScheme.
ThemeColorTypeThe name of an entry in the page's color scheme.
VideoA PageElement representing a video.
VideoSourceTypeThe video source types.
WordArtA PageElement representing word art.

AffineTransform

Methods

MethodReturn typeBrief description
getScaleX()NumberGets the X coordinate scaling element.
getScaleY()NumberGets the Y coordinate scaling element.
getShearX()NumberGets the X coordinate shearing element.
getShearY()NumberGets the Y coordinate shearing element.
getTranslateX()NumberGets the X coordinate translation element in points.
getTranslateY()NumberGets the Y coordinate translation element in points.
toBuilder()AffineTransformBuilderReturns a new AffineTransformBuilder based on this transform.

AffineTransformBuilder

Methods

MethodReturn typeBrief description
build()AffineTransformCreates an AffineTransform object initialized with the elements set in the builder.
setScaleX(scaleX)AffineTransformBuilderSets the X coordinate scaling element and returns the builder.
setScaleY(scaleY)AffineTransformBuilderSets the Y coordinate scaling element and returns the builder.
setShearX(shearX)AffineTransformBuilderSets the X coordinate shearing element and returns the builder.
setShearY(shearY)AffineTransformBuilderSets the Y coordinate shearing element and returns the builder.
setTranslateX(translateX)AffineTransformBuilderSets the X coordinate translation element in points, and returns the builder.
setTranslateY(translateY)AffineTransformBuilderSets the Y coordinate translation element in points, and returns the builder.

AlignmentPosition

Properties

PropertyTypeDescription
CENTEREnumAlign to the center.
HORIZONTAL_CENTEREnumAlign to the horizontal center.
VERTICAL_CENTEREnumAlign to the vertical center.

ArrowStyle

Properties

PropertyTypeDescription
UNSUPPORTEDEnumAn arrow style that is not supported.
NONEEnumNo arrow.
STEALTH_ARROWEnumArrow with notched back.
FILL_ARROWEnumFilled arrow.
FILL_CIRCLEEnumFilled circle.
FILL_SQUAREEnumFilled square.
FILL_DIAMONDEnumFilled diamond.
OPEN_ARROWEnumHollow arrow.
OPEN_CIRCLEEnumHollow circle.
OPEN_SQUAREEnumHollow square.
OPEN_DIAMONDEnumHollow diamond.

AutoText

Methods

MethodReturn typeBrief description
getAutoTextType()AutoTextTypeReturns the type of auto text.
getIndex()IntegerReturns the index of the auto text.
getRange()TextRangeReturns a TextRange spanning the auto text.

AutoTextType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumAn auto text type that is not supported.
SLIDE_NUMBEREnumA slide number.

Autofit

Methods

MethodReturn typeBrief description
disableAutofit()AutofitSets the AutofitType of a shape to AutofitType.NONE.
getAutofitType()AutofitTypeGets the AutofitType of the shape.
getFontScale()NumberGets the font scale applied to the shape.
getLineSpacingReduction()NumberGets the line spacing reduction applied to the shape.

AutofitType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumAn autofit type that is not supported.
NONEEnumAutofit isn't applied.
TEXT_AUTOFITEnumShrinks the text on overflow.
SHAPE_AUTOFITEnumResizes the shape to fit the text.

Border

Methods

MethodReturn typeBrief description
getDashStyle()DashStyleGets the DashStyle of the border.
getLineFill()LineFillGets the LineFill of the border.
getWeight()NumberGets the thickness of the border in points.
isVisible()BooleanGets whether the border is visible or not.
setDashStyle(style)BorderSets the DashStyle of the border.
setTransparent()BorderSets the border to be transparent.
setWeight(points)BorderSets the thickness of the border in points.

CellMergeState

Properties

PropertyTypeDescription
NORMALEnumThe cell is not merged.
HEADEnumThe cell is merged and it is the head (i.e.
MERGEDEnumThe cell is merged but is not the head (i.e.

Color

Methods

MethodReturn typeBrief description
asRgbColor()RgbColorConverts this color to an RgbColor.
asThemeColor()ThemeColorConverts this color to a ThemeColor.
getColorType()ColorTypeGet the type of this color.

ColorScheme

Methods

MethodReturn typeBrief description
getConcreteColor(theme)ColorReturns the concrete Color associated with the ThemeColorType in this color scheme.
getThemeColors()ThemeColorType[]Returns a list of all possible theme color types in a color scheme.
setConcreteColor(type, color)ColorSchemeSets the concrete color associated with the ThemeColorType in this color scheme to the given color.
setConcreteColor(type, red, green, blue)ColorSchemeSets the concrete color associated with the ThemeColorType in this color scheme to the given color in RGB format.
setConcreteColor(type, hexColor)ColorSchemeSets the concrete color associated with the ThemeColorType in this color scheme to the given color in HEX format.

ConnectionSite

Methods

MethodReturn typeBrief description
getIndex()IntegerReturns the index of the connection site.
getPageElement()PageElementReturns the PageElement that the connection site is on.

ContentAlignment

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA content alignment that is not supported.
TOPEnumAligns the content to the top of the content holder.
MIDDLEEnumAligns the content to the middle of the content holder.
BOTTOMEnumAligns the content to the bottom of the content holder.

DashStyle

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA dash style that is not supported.
SOLIDEnumSolid line.
DOTEnumDotted line.
DASHEnumDashed line.
DASH_DOTEnumAlternating dashes and dots.
LONG_DASHEnumLine with large dashes.
LONG_DASH_DOTEnumAlternating large dashes and dots.

Fill

Methods

MethodReturn typeBrief description
getSolidFill()SolidFillGet the solid fill of this background, or null if the fill type is not FillType.SOLID.
getType()FillTypeGet the type of this fill.
isVisible()BooleanWhether the background is visible.
setSolidFill(color)voidSets the solid fill to the given Color.
setSolidFill(color, alpha)voidSets the solid fill to the given alpha and Color.
setSolidFill(red, green, blue)voidSets the solid fill to the given RGB values.
setSolidFill(red, green, blue, alpha)voidSets the solid fill to the given alpha and RGB values.
setSolidFill(hexString)voidSets the solid fill to the given hex color string.
setSolidFill(hexString, alpha)voidSets the solid fill to the given alpha and hex color string.
setSolidFill(color)voidSets the solid fill to the given ThemeColorType.
setSolidFill(color, alpha)voidSets the solid fill to the given alpha and ThemeColorType.
setTransparent()voidSets the background to transparent.

FillType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA fill type that is not supported.
NONEEnumNo fill, so the background is transparent.
SOLIDEnumA solid color fill.

Group

Methods

MethodReturn typeBrief description
alignOnPage(alignmentPosition)GroupAligns the element to the specified alignment position on the page.
bringForward()GroupBrings the page element forward on the page by one element.
bringToFront()GroupBrings the page element to the front of the page.
duplicate()PageElementDuplicates the page element.
getChildren()PageElement[]Gets the collection of page elements in the group.
getConnectionSites()ConnectionSite[]Returns the list of ConnectionSites on the page element, or an empty list if the page element does not have any connection sites.
getDescription()StringReturns the page element's alt text description.
getHeight()NumberGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight()NumberReturns the element's inherent height in points.
getInherentWidth()NumberReturns the element's inherent width in points.
getLeft()NumberReturns the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
getObjectId()StringReturns the unique ID for this object.
getPageElementType()PageElementTypeReturns the page element's type, represented as a PageElementType enum.
getParentGroup()GroupReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage()PageReturns the page this page element is on.
getRotation()NumberReturns the element's clockwise rotation angle around its center in degrees, where zero degrees means no rotation.
getTitle()StringReturns the page element's alt text title.
getTop()NumberGets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
getTransform()AffineTransformGets the page element's transform.
getWidth()NumberReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform)GroupPreconcatenates the provided transform to the existing transform of the page element.
remove()voidRemoves the page element.
scaleHeight(ratio)GroupScales the element's height by the specified ratio.
scaleWidth(ratio)GroupScales the element's width by the specified ratio.
select()voidSelects only the PageElement in the active presentation and removes any previous selection.
select(replace)voidSelects the PageElement in the active presentation.
sendBackward()GroupSends the page element backward on the page by one element.
sendToBack()GroupSends the page element to the back of the page.
setDescription(description)GroupSets the page element's alt text description.
setHeight(height)GroupSets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left)GroupSets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setRotation(angle)GroupSets the element's clockwise rotation angle around its center in degrees.
setTitle(title)GroupSets the page element's alt text title.
setTop(top)GroupSets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform)GroupSets the transform of the page element with the provided transform.
setWidth(width)GroupSets the element's width in points, which is the width of the element's bounding box when the element has no rotation.
ungroup()voidUngroups the elements of the group.

Image

Methods

MethodReturn typeBrief description
alignOnPage(alignmentPosition)ImageAligns the element to the specified alignment position on the page.
bringForward()ImageBrings the page element forward on the page by one element.
bringToFront()ImageBrings the page element to the front of the page.
duplicate()PageElementDuplicates the page element.
getAs(contentType)BlobReturn the data inside this object as a blob converted to the specified content type.
getBlob()BlobReturn the data inside this image as a blob.
getBorder()BorderReturns the Border of the image.
getConnectionSites()ConnectionSite[]Returns the list of ConnectionSites on the page element, or an empty list if the page element does not have any connection sites.
getContentUrl()StringGets a URL to the image.
getDescription()StringReturns the page element's alt text description.
getHeight()NumberGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight()NumberReturns the element's inherent height in points.
getInherentWidth()NumberReturns the element's inherent width in points.
getLeft()NumberReturns the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
getLink()LinkReturns the Link or null if there is no link.
getObjectId()StringReturns the unique ID for this object.
getPageElementType()PageElementTypeReturns the page element's type, represented as a PageElementType enum.
getParentGroup()GroupReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage()PageReturns the page this page element is on.
getParentPlaceholder()PageElementReturns the parent page element of the placeholder.
getPlaceholderIndex()IntegerReturns the index of the placeholder image.
getPlaceholderType()PlaceholderTypeReturns the placeholder type of the image, or PlaceholderType.NONE if the shape is not a placeholder.
getRotation()NumberReturns the element's clockwise rotation angle around its center in degrees, where zero degrees means no rotation.
getSourceUrl()StringGets the image's source URL, if available.
getTitle()StringReturns the page element's alt text title.
getTop()NumberGets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
getTransform()AffineTransformReturns the page element's transform.
getWidth()NumberReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform)ImagePreconcatenates the provided transform to the existing transform of the page element.
remove()voidRemoves the page element.
removeLink()voidRemoves a Link.
replace(blobSource)ImageReplaces this image with an image described by a BlobSource object.
replace(blobSource, crop)ImageReplaces this image with an image described by a Image object, optionally cropping the image to fit.
replace(imageUrl)ImageReplaces this image with another image downloaded from the provided URL.
replace(imageUrl, crop)ImageReplaces this image with another image downloaded from the provided URL, optionally cropping the image to fit.
scaleHeight(ratio)ImageScales the element's height by the specified ratio.
scaleWidth(ratio)ImageScales the element's width by the specified ratio.
select()voidSelects only the PageElement in the active presentation and removes any previous selection.
select(replace)voidSelects the PageElement in the active presentation.
sendBackward()ImageSends the page element backward on the page by one element.
sendToBack()ImageSends the page element to the back of the page.
setDescription(description)ImageSets the page element's alt text description.
setHeight(height)ImageSets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left)ImageSets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setLinkSlide(slideIndex)LinkSets a Link to the given Slide using the zero-based index of the slide.
setLinkSlide(slide)LinkSets a Link to the given Slide, the link is set by the given slide ID.
setLinkSlide(slidePosition)LinkSets a Link to the given Slide using the relative position of the slide.
setLinkUrl(url)LinkSets a Link to the given non-empty URL string.
setRotation(angle)ImageSets the element's clockwise rotation angle around its center in degrees.
setTitle(title)ImageSets the page element's alt text title.
setTop(top)ImageSets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform)ImageSets the transform of the page element with the provided transform.
setWidth(width)ImageSets the element's width in points, which is the width of the element's bounding box when the element has no rotation.

Layout

Methods

MethodReturn typeBrief description
getBackground()PageBackgroundGets the page's background.
getColorScheme()ColorSchemeGets the ColorScheme associated with the page.
getGroups()Group[]Returns the list of Group objects on the page.
getImages()Image[]Returns the list of Image objects on the page.
getLayoutName()StringGets the name of the layout.
getLines()Line[]Returns the list of Line objects on the page.
getMaster()MasterGets the master that the layout is based on.
getObjectId()StringGets the unique ID for the page.
getPageElementById(id)PageElementReturns the PageElement on the page with the given ID, or null if none exists.
getPageElements()PageElement[]Returns the list of PageElement objects rendered on the page.
getPageType()PageTypeGets the type of the page.
getPlaceholder(placeholderType)PageElementReturns the placeholder PageElement object for a specified PlaceholderType or null if a matching placeholder is not present.
getPlaceholder(placeholderType, placeholderIndex)PageElementReturns the placeholder PageElement object for a specified PlaceholderType and a placeholder index, or null if the placeholder is not present.
getPlaceholders()PageElement[]Returns the list of placeholder PageElement objects in the page.
getShapes()Shape[]Returns the list of Shape objects on the page.
getSheetsCharts()SheetsChart[]Returns the list of SheetsChart objects on the page.
getTables()Table[]Returns the list of Table objects on the page.
getVideos()Video[]Returns the list of Video objects on the page.
getWordArts()WordArt[]Returns the list of WordArt objects on the page.
group(pageElements)GroupGroups all the specified page elements.
insertGroup(group)GroupInserts a copy of the provided Group on the page.
insertImage(blobSource)ImageInserts an image at the top left corner of the page with a default size from the specified image blob.
insertImage(blobSource, left, top, width, height)ImageInserts an image on the page with the provided position and size from the specified image blob.
insertImage(image)ImageInserts a copy of the provided Image on the page.
insertImage(imageUrl)ImageInserts an image at the top left corner of the page with a default size from the provided URL.
insertImage(imageUrl, left, top, width, height)ImageInserts an image on the page with the provided position and size from the provided URL.
insertLine(line)LineInserts a copy of the provided Line on the page.
insertLine(lineCategory, startConnectionSite, endConnectionSite)LineInserts a line on the page connecting two connection sites.
insertLine(lineCategory, startLeft, startTop, endLeft, endTop)LineInserts a line on the page.
insertPageElement(pageElement)PageElementInserts a copy of the provided PageElement on the page.
insertShape(shape)ShapeInserts a copy of the provided Shape on the page.
insertShape(shapeType)ShapeInserts a shape on the page.
insertShape(shapeType, left, top, width, height)ShapeInserts a shape on the page.
insertSheetsChart(sourceChart)SheetsChartInserts a Google Sheets chart on the page.
insertSheetsChart(sourceChart, left, top, width, height)SheetsChartInserts a Google Sheets chart on the page with the provided position and size.
insertSheetsChart(sheetsChart)SheetsChartInserts a copy of the provided SheetsChart on the page.
insertSheetsChartAsImage(sourceChart)ImageInserts a Google Sheets chart as an Image on the page.
insertSheetsChartAsImage(sourceChart, left, top, width, height)ImageInserts a Google Sheets chart as an Image on the page with the provided position and size.
insertTable(numRows, numColumns)TableInserts a table on the page.
insertTable(numRows, numColumns, left, top, width, height)TableInserts a table on the page with the provided position and size.
insertTable(table)TableInserts a copy of the provided Table on the page.
insertTextBox(text)ShapeInserts a text box Shape containing the provided string on the page.
insertTextBox(text, left, top, width, height)ShapeInserts a text box Shape containing the provided string on the page.
insertVideo(videoUrl)VideoInserts a video at the top left corner of the page with a default size.
insertVideo(videoUrl, left, top, width, height)VideoInserts a video on the page with the provided position and size.
insertVideo(video)VideoInserts a copy of the provided Video on the page.
insertWordArt(wordArt)WordArtInserts a copy of the provided WordArt on the page.
remove()voidRemoves the page.
replaceAllText(findText, replaceText)IntegerReplaces all instances of text matching find text with replace text.
replaceAllText(findText, replaceText, matchCase)IntegerReplaces all instances of text matching find text with replace text.
selectAsCurrentPage()voidSelects the Page in the active presentation as the current page selection and removes any previous selection.

Line

Methods

MethodReturn typeBrief description
alignOnPage(alignmentPosition)LineAligns the element to the specified alignment position on the page.
bringForward()LineBrings the page element forward on the page by one element.
bringToFront()LineBrings the page element to the front of the page.
duplicate()PageElementDuplicates the page element.
getConnectionSites()ConnectionSite[]Returns the list of ConnectionSites on the page element, or an empty list if the page element does not have any connection sites.
getDashStyle()DashStyleGets the DashStyle of the line.
getDescription()StringReturns the page element's alt text description.
getEnd()PointReturns the end point of the line, measured from the upper-left corner of the page.
getEndArrow()ArrowStyleGets the ArrowStyle of the arrow at the end of the line.
getEndConnection()ConnectionSiteReturns the connection at the end of the line, or null if there is no connection.
getHeight()NumberGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight()NumberReturns the element's inherent height in points.
getInherentWidth()NumberReturns the element's inherent width in points.
getLeft()NumberReturns the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
getLineCategory()LineCategoryGets the LineCategory of the line.
getLineFill()LineFillGets the LineFill of the line.
getLineType()LineTypeGets the LineType of the line.
getLink()LinkReturns the Link or null if there is no link.
getObjectId()StringReturns the unique ID for this object.
getPageElementType()PageElementTypeReturns the page element's type, represented as a PageElementType enum.
getParentGroup()GroupReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage()PageReturns the page this page element is on.
getRotation()NumberReturns the element's clockwise rotation angle around its center in degrees, where zero degrees means no rotation.
getStart()PointReturns the start point of the line, measured from the upper-left corner of the page.
getStartArrow()ArrowStyleGets the ArrowStyle of the arrow at the beginning of the line.
getStartConnection()ConnectionSiteReturns the connection at the beginning of the line, or null if there is no connection.
getTitle()StringReturns the page element's alt text title.
getTop()NumberGets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
getTransform()AffineTransformReturns the page element's transform.
getWeight()NumberReturns the thickness of the line in points.
getWidth()NumberReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
isConnector()BooleanReturns true if the line is a connector, or false if not.
preconcatenateTransform(transform)LinePreconcatenates the provided transform to the existing transform of the page element.
remove()voidRemoves the page element.
removeLink()voidRemoves a Link.
reroute()LineReroutes the start and end of the line to the closest two connection sites on the connected page elements.
scaleHeight(ratio)LineScales the element's height by the specified ratio.
scaleWidth(ratio)LineScales the element's width by the specified ratio.
select()voidSelects only the PageElement in the active presentation and removes any previous selection.
select(replace)voidSelects the PageElement in the active presentation.
sendBackward()LineSends the page element backward on the page by one element.
sendToBack()LineSends the page element to the back of the page.
setDashStyle(style)LineSets the DashStyle of the line.
setDescription(description)LineSets the page element's alt text description.
setEnd(left, top)LineSets the position of the end point of the line.
setEnd(point)LineSets the position of the end point of the line.
setEndArrow(style)LineSets the ArrowStyle of the arrow at the end of the line.
setEndConnection(connectionSite)LineSets the connection at the end of the line.
setHeight(height)LineSets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left)LineSets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setLineCategory(lineCategory)LineSets the LineCategory of the line.
setLinkSlide(slideIndex)LinkSets a Link to the given Slide using the zero-based index of the slide.
setLinkSlide(slide)LinkSets a Link to the given Slide, the link is set by the given slide ID.
setLinkSlide(slidePosition)LinkSets a Link to the given Slide using the relative position of the slide.
setLinkUrl(url)LinkSets a Link to the given non-empty URL string.
setRotation(angle)LineSets the element's clockwise rotation angle around its center in degrees.
setStart(left, top)LineSets the position of the start point of the line.
setStart(point)LineSets the position of the start point of the line.
setStartArrow(style)LineSets the ArrowStyle of the arrow at the beginning of the line.
setStartConnection(connectionSite)LineSets the connection at the beginning of the line.
setTitle(title)LineSets the page element's alt text title.
setTop(top)LineSets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform)LineSets the transform of the page element with the provided transform.
setWeight(points)LineSets the thickness of the line in points.
setWidth(width)LineSets the element's width in points, which is the width of the element's bounding box when the element has no rotation.

LineCategory

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA line category that is not supported.
STRAIGHTEnumStraight connectors, including straight connector 1.
BENTEnumBent connectors, including bent connector 2 to 5.
CURVEDEnumCurved connectors, including curved connector 2 to 5.

LineFill

Methods

MethodReturn typeBrief description
getFillType()LineFillTypeGets the type of the line fill.
getSolidFill()SolidFillGets the solid fill of the line, or null if the fill type is not LineFillType.SOLID.
setSolidFill(color)voidSets the solid fill to the given Color.
setSolidFill(color, alpha)voidSets the solid fill to the given alpha and Color.
setSolidFill(red, green, blue)voidSets the solid fill to the given RGB values.
setSolidFill(red, green, blue, alpha)voidSets the solid fill to the given alpha and RGB values.
setSolidFill(hexString)voidSets the solid fill to the given hex color string.
setSolidFill(hexString, alpha)voidSets the solid fill to the given alpha and hex color string.
setSolidFill(color)voidSets the solid fill to the given ThemeColorType.
setSolidFill(color, alpha)voidSets the solid fill to the given alpha and ThemeColorType.

LineFillType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA line fill type that is not supported.
NONEEnumNo fill, so the line or outline is transparent.
SOLIDEnumA solid color fill.

LineType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA line type that is not supported.
STRAIGHT_CONNECTOR_1EnumStraight connector 1 form.
BENT_CONNECTOR_2EnumBent connector 2 form.
BENT_CONNECTOR_3EnumBent connector 3 form.
BENT_CONNECTOR_4EnumBent connector 4 form.
BENT_CONNECTOR_5EnumBent connector 5 form.
CURVED_CONNECTOR_2EnumCurved connector 2 form.
CURVED_CONNECTOR_3EnumCurved connector 3 form.
CURVED_CONNECTOR_4EnumCurved connector 4 form.
CURVED_CONNECTOR_5EnumCurved connector 5 form.
STRAIGHT_LINEEnumStraight line.

Methods

MethodReturn typeBrief description
getLinkType()LinkTypeReturns the LinkType.
getLinkedSlide()SlideReturns the linked Slide for non-URL links types, if it exists.
getSlideId()StringReturns the ID of the linked Slide or null if the LinkType is not LinkType.SLIDE_ID.
getSlideIndex()IntegerReturns the zero-based index of the linked Slide or null if the LinkType is not LinkType.SLIDE_INDEX.
getSlidePosition()SlidePositionReturns the SlidePosition of the linked Slide or null if the LinkType is not LinkType.SLIDE_POSITION.
getUrl()StringReturns the URL to the external web page or null if the LinkType is not LinkType.URL.

LinkType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA link type that is not supported.
URLEnumA link to an external web page.
SLIDE_POSITIONEnumA link to a specific slide in this presentation, addressed by its position.
SLIDE_IDEnumA link to a specific slide in this presentation, addressed by its ID.
SLIDE_INDEXEnumA link to a specific slide in this presentation, addressed by its zero-based index.

List

Methods

MethodReturn typeBrief description
getListId()StringReturns the ID of the list.
getListParagraphs()Paragraph[]Returns all the Paragraphs in the list.

ListPreset

Properties

PropertyTypeDescription
DISC_CIRCLE_SQUAREEnumA list with a `DISC`, `CIRCLE` and `SQUARE` glyphs for the first 3 list nesting levels.
DIAMONDX_ARROW3D_SQUAREEnumA list with a `DIAMONDX`, `ARROW3D` and `SQUARE` glyphs for the first 3 list nesting levels.
CHECKBOXEnumA list with `CHECKBOX` glyphs for all list nesting levels.
ARROW_DIAMOND_DISCEnumA list with a `ARROW`, `DIAMOND` and `DISC` glyphs for the first 3 list nesting levels.
STAR_CIRCLE_SQUAREEnumA list with a `STAR`, `CIRCLE` and `SQUARE` glyphs for the first 3 list nesting levels.
ARROW3D_CIRCLE_SQUAREEnumA list with a `ARROW3D`, `CIRCLE` and `SQUARE` glyphs for the first 3 list nesting levels.
LEFTTRIANGLE_DIAMOND_DISCEnumA list with a `LEFTTRIANGLE`, `DIAMOND` and `DISC` glyphs for the first 3 list nesting levels.
DIAMONDX_HOLLOWDIAMOND_SQUAREEnumA list with a `DIAMONDX`, `HOLLOWDIAMOND` and `SQUARE` glyphs for the first 3 list nesting levels.
DIAMOND_CIRCLE_SQUAREEnumA list with a `DIAMOND`, `CIRCLE` and `SQUARE` glyphs for the first 3 list nesting levels.
DIGIT_ALPHA_ROMANEnumA list with `DIGIT`, `ALPHA` and `ROMAN` glyphs for the first 3 list nesting levels, followed by periods.
DIGIT_ALPHA_ROMAN_PARENSEnumA list with `DIGIT`, `ALPHA` and `ROMAN` glyphs for the first 3 list nesting levels, followed by parenthesis.
DIGIT_NESTEDEnumA list with `DIGIT` glyphs separated by periods, where each nesting level uses the previous nesting level's glyph as a prefix.
UPPERALPHA_ALPHA_ROMANEnumA list with `UPPERALPHA`, `ALPHA` and `ROMAN` glyphs for the first 3 list nesting levels, followed by periods.
UPPERROMAN_UPPERALPHA_DIGITEnumA list with `UPPERROMAN`, `UPPERALPHA` and `DIGIT` glyphs for the first 3 list nesting levels, followed by periods.
ZERODIGIT_ALPHA_ROMANEnumA list with `ZERODIGIT`, `ALPHA` and `ROMAN` glyphs for the first 3 list nesting levels, followed by periods.

ListStyle

Methods

MethodReturn typeBrief description
applyListPreset(listPreset)ListStyleApplies the specified ListPreset to all of the paragraphs that overlap with the text.
getGlyph()StringReturns the rendered glyph for the text.
getList()ListReturns the List the text is in, or null if none of the text is in a list, or part of the text is in a list, or the text is in multiple lists.
getNestingLevel()IntegerReturns the 0-based nesting level of the text.
isInList()BooleanReturns true if the text is in exactly one list, false if none of the text is in a list, and null if only some of the text is in a list or if the text is in multiple lists.
removeFromList()ListStyleRemoves the paragraphs that overlap with the text from any lists.

Master

Methods

MethodReturn typeBrief description
getBackground()PageBackgroundGets the page's background.
getColorScheme()ColorSchemeGets the ColorScheme associated with the page.
getGroups()Group[]Returns the list of Group objects on the page.
getImages()Image[]Returns the list of Image objects on the page.
getLayouts()Layout[]Gets this master's layouts.
getLines()Line[]Returns the list of Line objects on the page.
getObjectId()StringGets the unique ID for the page.
getPageElementById(id)PageElementReturns the PageElement on the page with the given ID, or null if none exists.
getPageElements()PageElement[]Returns the list of PageElement objects rendered on the page.
getPageType()PageTypeGets the type of the page.
getPlaceholder(placeholderType)PageElementReturns the placeholder PageElement object for a specified PlaceholderType or null if a matching placeholder is not present.
getPlaceholder(placeholderType, placeholderIndex)PageElementReturns the placeholder PageElement object for a specified PlaceholderType and a placeholder index, or null if the placeholder is not present.
getPlaceholders()PageElement[]Returns the list of placeholder PageElement objects in the page.
getShapes()Shape[]Returns the list of Shape objects on the page.
getSheetsCharts()SheetsChart[]Returns the list of SheetsChart objects on the page.
getTables()Table[]Returns the list of Table objects on the page.
getVideos()Video[]Returns the list of Video objects on the page.
getWordArts()WordArt[]Returns the list of WordArt objects on the page.
group(pageElements)GroupGroups all the specified page elements.
insertGroup(group)GroupInserts a copy of the provided Group on the page.
insertImage(blobSource)ImageInserts an image at the top left corner of the page with a default size from the specified image blob.
insertImage(blobSource, left, top, width, height)ImageInserts an image on the page with the provided position and size from the specified image blob.
insertImage(image)ImageInserts a copy of the provided Image on the page.
insertImage(imageUrl)ImageInserts an image at the top left corner of the page with a default size from the provided URL.
insertImage(imageUrl, left, top, width, height)ImageInserts an image on the page with the provided position and size from the provided URL.
insertLine(line)LineInserts a copy of the provided Line on the page.
insertLine(lineCategory, startConnectionSite, endConnectionSite)LineInserts a line on the page connecting two connection sites.
insertLine(lineCategory, startLeft, startTop, endLeft, endTop)LineInserts a line on the page.
insertPageElement(pageElement)PageElementInserts a copy of the provided PageElement on the page.
insertShape(shape)ShapeInserts a copy of the provided Shape on the page.
insertShape(shapeType)ShapeInserts a shape on the page.
insertShape(shapeType, left, top, width, height)ShapeInserts a shape on the page.
insertSheetsChart(sourceChart)SheetsChartInserts a Google Sheets chart on the page.
insertSheetsChart(sourceChart, left, top, width, height)SheetsChartInserts a Google Sheets chart on the page with the provided position and size.
insertSheetsChart(sheetsChart)SheetsChartInserts a copy of the provided SheetsChart on the page.
insertSheetsChartAsImage(sourceChart)ImageInserts a Google Sheets chart as an Image on the page.
insertSheetsChartAsImage(sourceChart, left, top, width, height)ImageInserts a Google Sheets chart as an Image on the page with the provided position and size.
insertTable(numRows, numColumns)TableInserts a table on the page.
insertTable(numRows, numColumns, left, top, width, height)TableInserts a table on the page with the provided position and size.
insertTable(table)TableInserts a copy of the provided Table on the page.
insertTextBox(text)ShapeInserts a text box Shape containing the provided string on the page.
insertTextBox(text, left, top, width, height)ShapeInserts a text box Shape containing the provided string on the page.
insertVideo(videoUrl)VideoInserts a video at the top left corner of the page with a default size.
insertVideo(videoUrl, left, top, width, height)VideoInserts a video on the page with the provided position and size.
insertVideo(video)VideoInserts a copy of the provided Video on the page.
insertWordArt(wordArt)WordArtInserts a copy of the provided WordArt on the page.
remove()voidRemoves the page.
replaceAllText(findText, replaceText)IntegerReplaces all instances of text matching find text with replace text.
replaceAllText(findText, replaceText, matchCase)IntegerReplaces all instances of text matching find text with replace text.
selectAsCurrentPage()voidSelects the Page in the active presentation as the current page selection and removes any previous selection.

NotesMaster

Methods

MethodReturn typeBrief description
getGroups()Group[]Returns the list of Group objects on the page.
getImages()Image[]Returns the list of Image objects on the page.
getLines()Line[]Returns the list of Line objects on the page.
getObjectId()StringGets the unique ID for the page.
getPageElementById(id)PageElementReturns the PageElement on the page with the given ID, or null if none exists.
getPageElements()PageElement[]Returns the list of PageElement objects rendered on the page.
getPlaceholder(placeholderType)PageElementReturns the placeholder PageElement object for a specified PlaceholderType or null if a matching placeholder is not present.
getPlaceholder(placeholderType, placeholderIndex)PageElementReturns the placeholder PageElement object for a specified PlaceholderType and a placeholder index, or null if the placeholder is not present.
getPlaceholders()PageElement[]Returns the list of placeholder PageElement objects in the page.
getShapes()Shape[]Returns the list of Shape objects on the page.
getSheetsCharts()SheetsChart[]Returns the list of SheetsChart objects on the page.
getTables()Table[]Returns the list of Table objects on the page.
getVideos()Video[]Returns the list of Video objects on the page.
getWordArts()WordArt[]Returns the list of WordArt objects on the page.

NotesPage

Methods

MethodReturn typeBrief description
getGroups()Group[]Returns the list of Group objects on the page.
getImages()Image[]Returns the list of Image objects on the page.
getLines()Line[]Returns the list of Line objects on the page.
getObjectId()StringGets the unique ID for the page.
getPageElementById(id)PageElementReturns the PageElement on the page with the given ID, or null if none exists.
getPageElements()PageElement[]Returns the list of PageElement objects rendered on the page.
getPlaceholder(placeholderType)PageElementReturns the placeholder PageElement object for a specified PlaceholderType or null if a matching placeholder is not present.
getPlaceholder(placeholderType, placeholderIndex)PageElementReturns the placeholder PageElement object for a specified PlaceholderType and a placeholder index, or null if the placeholder is not present.
getPlaceholders()PageElement[]Returns the list of placeholder PageElement objects in the page.
getShapes()Shape[]Returns the list of Shape objects on the page.
getSheetsCharts()SheetsChart[]Returns the list of SheetsChart objects on the page.
getSpeakerNotesShape()ShapeGets the shape containing the speaker notes on the page.
getTables()Table[]Returns the list of Table objects on the page.
getVideos()Video[]Returns the list of Video objects on the page.
getWordArts()WordArt[]Returns the list of WordArt objects on the page.
replaceAllText(findText, replaceText)IntegerReplaces all instances of text matching find text with replace text.
replaceAllText(findText, replaceText, matchCase)IntegerReplaces all instances of text matching find text with replace text.

Page

Methods

MethodReturn typeBrief description
asLayout()LayoutReturns the page as a layout.
asMaster()MasterReturns the page as a master.
asSlide()SlideReturns the page as a slide.
getBackground()PageBackgroundGets the page's background.
getColorScheme()ColorSchemeGets the ColorScheme associated with the page.
getGroups()Group[]Returns the list of Group objects on the page.
getImages()Image[]Returns the list of Image objects on the page.
getLines()Line[]Returns the list of Line objects on the page.
getObjectId()StringGets the unique ID for the page.
getPageElementById(id)PageElementReturns the PageElement on the page with the given ID, or null if none exists.
getPageElements()PageElement[]Returns the list of PageElement objects rendered on the page.
getPageType()PageTypeGets the type of the page.
getPlaceholder(placeholderType)PageElementReturns the placeholder PageElement object for a specified PlaceholderType or null if a matching placeholder is not present.
getPlaceholder(placeholderType, placeholderIndex)PageElementReturns the placeholder PageElement object for a specified PlaceholderType and a placeholder index, or null if the placeholder is not present.
getPlaceholders()PageElement[]Returns the list of placeholder PageElement objects in the page.
getShapes()Shape[]Returns the list of Shape objects on the page.
getSheetsCharts()SheetsChart[]Returns the list of SheetsChart objects on the page.
getTables()Table[]Returns the list of Table objects on the page.
getVideos()Video[]Returns the list of Video objects on the page.
getWordArts()WordArt[]Returns the list of WordArt objects on the page.
group(pageElements)GroupGroups all the specified page elements.
insertGroup(group)GroupInserts a copy of the provided Group on the page.
insertImage(blobSource)ImageInserts an image at the top left corner of the page with a default size from the specified image blob.
insertImage(blobSource, left, top, width, height)ImageInserts an image on the page with the provided position and size from the specified image blob.
insertImage(image)ImageInserts a copy of the provided Image on the page.
insertImage(imageUrl)ImageInserts an image at the top left corner of the page with a default size from the provided URL.
insertImage(imageUrl, left, top, width, height)ImageInserts an image on the page with the provided position and size from the provided URL.
insertLine(line)LineInserts a copy of the provided Line on the page.
insertLine(lineCategory, startConnectionSite, endConnectionSite)LineInserts a line on the page connecting two connection sites.
insertLine(lineCategory, startLeft, startTop, endLeft, endTop)LineInserts a line on the page.
insertPageElement(pageElement)PageElementInserts a copy of the provided PageElement on the page.
insertShape(shape)ShapeInserts a copy of the provided Shape on the page.
insertShape(shapeType)ShapeInserts a shape on the page.
insertShape(shapeType, left, top, width, height)ShapeInserts a shape on the page.
insertSheetsChart(sourceChart)SheetsChartInserts a Google Sheets chart on the page.
insertSheetsChart(sourceChart, left, top, width, height)SheetsChartInserts a Google Sheets chart on the page with the provided position and size.
insertSheetsChart(sheetsChart)SheetsChartInserts a copy of the provided SheetsChart on the page.
insertSheetsChartAsImage(sourceChart)ImageInserts a Google Sheets chart as an Image on the page.
insertSheetsChartAsImage(sourceChart, left, top, width, height)ImageInserts a Google Sheets chart as an Image on the page with the provided position and size.
insertTable(numRows, numColumns)TableInserts a table on the page.
insertTable(numRows, numColumns, left, top, width, height)TableInserts a table on the page with the provided position and size.
insertTable(table)TableInserts a copy of the provided Table on the page.
insertTextBox(text)ShapeInserts a text box Shape containing the provided string on the page.
insertTextBox(text, left, top, width, height)ShapeInserts a text box Shape containing the provided string on the page.
insertVideo(videoUrl)VideoInserts a video at the top left corner of the page with a default size.
insertVideo(videoUrl, left, top, width, height)VideoInserts a video on the page with the provided position and size.
insertVideo(video)VideoInserts a copy of the provided Video on the page.
insertWordArt(wordArt)WordArtInserts a copy of the provided WordArt on the page.
remove()voidRemoves the page.
replaceAllText(findText, replaceText)IntegerReplaces all instances of text matching find text with replace text.
replaceAllText(findText, replaceText, matchCase)IntegerReplaces all instances of text matching find text with replace text.
selectAsCurrentPage()voidSelects the Page in the active presentation as the current page selection and removes any previous selection.

PageBackground

Methods

MethodReturn typeBrief description
getPictureFill()PictureFillGet the stretched picture fill of this background, or null if the background fill type is not PageBackgroundType.PICTURE.
getSolidFill()SolidFillGet the solid fill of this background, or null if the background fill type is not PageBackgroundType.SOLID.
getType()PageBackgroundTypeGet the type of this page background.
isVisible()BooleanWhether the background is visible.
setPictureFill(blobSource)voidSets an image from the specified image blob as the page background.
setPictureFill(imageUrl)voidSets the image at the provided URL as the page background.
setSolidFill(color)voidSets the solid fill to the given Color.
setSolidFill(color, alpha)voidSets the solid fill to the given alpha and Color.
setSolidFill(red, green, blue)voidSets the solid fill to the given RGB values.
setSolidFill(red, green, blue, alpha)voidSets the solid fill to the given alpha and RGB values.
setSolidFill(hexString)voidSets the solid fill to the given hex color string.
setSolidFill(hexString, alpha)voidSets the solid fill to the given alpha and hex color string.
setSolidFill(color)voidSets the solid fill to the given ThemeColorType.
setSolidFill(color, alpha)voidSets the solid fill to the given alpha and ThemeColorType.
setTransparent()voidSets the background to transparent.

PageBackgroundType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA page background type that is not supported.
NONEEnumNo fill, so the background is rendered white.
SOLIDEnumA solid color fill.
PICTUREEnumA picture that is stretched to fill the page.

PageElement

Methods

MethodReturn typeBrief description
alignOnPage(alignmentPosition)PageElementAligns the element to the specified alignment position on the page.
asGroup()GroupReturns the page element as a group.
asImage()ImageReturns the page element as an image.
asLine()LineReturns the page element as a line.
asShape()ShapeReturns the page element as a shape.
asSheetsChart()SheetsChartReturns the page element as a linked chart embedded from Google Sheets.
asSpeakerSpotlight()SpeakerSpotlightReturns the page element as a speaker spotlight.
asTable()TableReturns the page element as a table.
asVideo()VideoReturns the page element as a video.
asWordArt()WordArtReturns the page element as word art.
bringForward()PageElementBrings the page element forward on the page by one element.
bringToFront()PageElementBrings the page element to the front of the page.
duplicate()PageElementDuplicates the page element.
getConnectionSites()ConnectionSite[]Returns the list of ConnectionSites on the page element, or an empty list if the page element does not have any connection sites.
getDescription()StringReturns the page element's alt text description.
getHeight()NumberGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight()NumberReturns the element's inherent height in points.
getInherentWidth()NumberReturns the element's inherent width in points.
getLeft()NumberReturns the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
getObjectId()StringReturns the unique ID for this object.
getPageElementType()PageElementTypeReturns the page element's type, represented as a PageElementType enum.
getParentGroup()GroupReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage()PageReturns the page this page element is on.
getRotation()NumberReturns the element's clockwise rotation angle around its center in degrees, where zero degrees means no rotation.
getTitle()StringReturns the page element's alt text title.
getTop()NumberGets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
getTransform()AffineTransformReturns the page element's transform.
getWidth()NumberReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform)PageElementPreconcatenates the provided transform to the existing transform of the page element.
remove()voidRemoves the page element.
scaleHeight(ratio)PageElementScales the element's height by the specified ratio.
scaleWidth(ratio)PageElementScales the element's width by the specified ratio.
select()voidSelects only the PageElement in the active presentation and removes any previous selection.
select(replace)voidSelects the PageElement in the active presentation.
sendBackward()PageElementSends the page element backward on the page by one element.
sendToBack()PageElementSends the page element to the back of the page.
setDescription(description)PageElementSets the page element's alt text description.
setHeight(height)PageElementSets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left)PageElementSets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setRotation(angle)PageElementSets the element's clockwise rotation angle around its center in degrees.
setTitle(title)PageElementSets the page element's alt text title.
setTop(top)PageElementSets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform)PageElementSets the transform of the page element with the provided transform.
setWidth(width)PageElementSets the element's width in points, which is the width of the element's bounding box when the element has no rotation.

PageElementRange

Methods

MethodReturn typeBrief description
getPageElements()PageElement[]Returns the list of PageElement instances.

PageElementType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumRepresents a page element that is not supported and cannot be further classified.
SHAPEEnumRepresents a generic shape that does not have a more specific classification.
IMAGEEnumRepresents an image.
VIDEOEnumRepresents a video.
TABLEEnumRepresents a table.
GROUPEnumRepresents a collection of page elements joined as a single unit.
LINEEnumRepresents a line.
WORD_ARTEnumRepresents word art.
SHEETS_CHARTEnumRepresents a linked chart embedded from Google Sheets.
SPEAKER_SPOTLIGHTEnumRepresents a speaker spotlight.

PageRange

Methods

MethodReturn typeBrief description
getPages()Page[]Returns the list of Page instances.

PageType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA page type that is not supported.
SLIDEEnumA slide page.
LAYOUTEnumA layout page.
MASTEREnumA master page.

Paragraph

Methods

MethodReturn typeBrief description
getIndex()IntegerReturns the index of the paragraph's newline.
getRange()TextRangeReturns a TextRange spanning the text in the paragraph ended by this object's newline character.

ParagraphAlignment

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA paragraph alignment that is not supported.
STARTEnumThe paragraph is aligned to the start of the line.
CENTEREnumThe paragraph is centered.
ENDEnumThe paragraph is aligned to the end of the line.
JUSTIFIEDEnumThe paragraph is justified.

ParagraphStyle

Methods

MethodReturn typeBrief description
getIndentEnd()NumberReturns the text end indentation for paragraphs in the TextRange in points, or null if there are multiple paragraph styles on the given text.
getIndentFirstLine()NumberReturns the indentation for the first line of paragraphs in the TextRange in points, or null if there are multiple paragraph styles on the given text.
getIndentStart()NumberReturns the text start indentation for paragraphs in the TextRange in points, or null if there are multiple paragraph styles on the given text.
getLineSpacing()NumberReturns the line spacing, or null if there are multiple paragraph styles on the given text.
getParagraphAlignment()ParagraphAlignmentReturns the ParagraphAlignment of paragraphs in the TextRange, or null if there are multiple paragraph styles on the given text.
getSpaceAbove()NumberReturns the extra space above paragraphs in the TextRange in points, or null if there are multiple paragraph styles on the given text.
getSpaceBelow()NumberReturns the extra space below paragraphs in the TextRange in points, or null if there are multiple paragraph styles on the given text.
getSpacingMode()SpacingModeReturns the SpacingMode for paragraphs in the TextRange, or null if there are multiple paragraph styles on the given text.
getTextDirection()TextDirectionReturns the TextDirection for paragraphs in the TextRange, or null if there are multiple paragraph styles on the given text.
setIndentEnd(indent)ParagraphStyleSets the text end indentation for paragraphs in the TextRange in points.
setIndentFirstLine(indent)ParagraphStyleSets the indentation for the first line of paragraphs in the TextRange in points.
setIndentStart(indent)ParagraphStyleSets the text start indentation for paragraphs in the TextRange in points.
setLineSpacing(spacing)ParagraphStyleSets the line spacing.
setParagraphAlignment(alignment)ParagraphStyleSets the ParagraphAlignment of paragraphs in the TextRange.
setSpaceAbove(space)ParagraphStyleSets the extra space above paragraphs in the TextRange in points.
setSpaceBelow(space)ParagraphStyleSets the extra space below paragraphs in the TextRange in points.
setSpacingMode(mode)ParagraphStyleSets the SpacingMode for paragraphs in the TextRange.
setTextDirection(direction)ParagraphStyleSets the TextDirection for paragraphs in the TextRange.

PictureFill

Methods

MethodReturn typeBrief description
getAs(contentType)BlobReturn the data inside this object as a blob converted to the specified content type.
getBlob()BlobReturn the data inside this object as a blob.
getContentUrl()StringGets a URL to the image.
getSourceUrl()StringGets the image's source URL, if available.

PlaceholderType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA placeholder type that is not supported.
NONEEnumNot a Placeholder.
BODYEnumBody text.
CHARTEnumChart or graph.
CLIP_ARTEnumClip art image.
CENTERED_TITLEEnumTitle centered.
DIAGRAMEnumDiagram.
DATE_AND_TIMEEnumDate and time.
FOOTEREnumFooter text.
HEADEREnumHeader text.
MEDIAEnumMultimedia.
OBJECTEnumAny content type.
PICTUREEnumPicture.
SLIDE_NUMBEREnumNumber of a slide.
SUBTITLEEnumSubtitle.
TABLEEnumTable.
TITLEEnumSlide title.
SLIDE_IMAGEEnumSlide image.

Point

Methods

MethodReturn typeBrief description
getX()NumberGets the horizontal coordinate, measured in points.
getY()NumberGets the vertical coordinate, measured in points.

PredefinedLayout

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA layout that is not supported.
BLANKEnumBlank layout, with no placeholders.
CAPTION_ONLYEnumLayout with a caption at the bottom.
TITLEEnumLayout with a title and a subtitle.
TITLE_AND_BODYEnumLayout with a title and body.
TITLE_AND_TWO_COLUMNSEnumLayout with a title and two columns.
TITLE_ONLYEnumLayout with only a title.
SECTION_HEADEREnumLayout with a section title.
SECTION_TITLE_AND_DESCRIPTIONEnumLayout with a title and subtitle on one side and description on the other.
ONE_COLUMN_TEXTEnumLayout with one title and one body, arranged in a single column.
MAIN_POINTEnumLayout with a main point.
BIG_NUMBEREnumLayout with a big number heading.

Presentation

Methods

MethodReturn typeBrief description
addEditor(emailAddress)PresentationAdds the given user to the list of editors for the Presentation.
addEditor(user)PresentationAdds the given user to the list of editors for the Presentation.
addEditors(emailAddresses)PresentationAdds the given array of users to the list of editors for the Presentation.
addViewer(emailAddress)PresentationAdds the given user to the list of viewers for the Presentation.
addViewer(user)PresentationAdds the given user to the list of viewers for the Presentation.
addViewers(emailAddresses)PresentationAdds the given array of users to the list of viewers for the Presentation.
appendSlide()SlideAppends a slide to the end of the presentation using the PredefinedLayout.BLANK predefined layout based on the current master.
appendSlide(layout)SlideAppends a slide to the end of the presentation using the specified layout based on the current master.
appendSlide(predefinedLayout)SlideAppends a slide to the end of the presentation using the specified predefined layout based on the current master.
appendSlide(slide)SlideAppends a copy of the provided Slide to the end of the presentation.
appendSlide(slide, linkingMode)SlideAppends a copy of the provided Slide from the source presentation to the end of the current presentation, and sets the slide link as specified by the SlideLinkingMode.
getEditors()User[]Gets the list of editors for this Presentation.
getId()StringGets the presentation's unique identifier.
getLayouts()Layout[]Gets the layouts in the presentation.
getMasters()Master[]Gets the masters in the presentation.
getName()StringGets the name or title of the presentation.
getNotesMaster()NotesMasterGets the notes master of the presentation.
getNotesPageHeight()NumberGets the page height of the notes master and notes pages in the presentation in points.
getNotesPageWidth()NumberGets the page width of the notes master and notes pages in the presentation in points.
getPageElementById(id)PageElementReturns the PageElement with the given ID, or null if none exists.
getPageHeight()NumberGets the page height of the slides, layouts, and masters in the presentation in points.
getPageWidth()NumberGets the page width of the slides, layouts, and masters in the presentation in points.
getSelection()SelectionGets the user’s selection in the active presentation.
getSlideById(id)SlideReturns the Slide with the given ID, or null if none exists.
getSlides()Slide[]Gets the slides in the presentation.
getUrl()StringRetrieves the URL to access this presentation.
getViewers()User[]Gets the list of viewers and commenters for this Presentation.
insertSlide(insertionIndex)SlideInserts a slide at the specified index in the presentation using the PredefinedLayout.BLANK predefined layout based on the current master.
insertSlide(insertionIndex, layout)SlideInserts a slide at the specified index in the presentation using the specified layout based on the current master.
insertSlide(insertionIndex, predefinedLayout)SlideInserts a slide at the specified index in the presentation using the specified predefined layout based on the current master.
insertSlide(insertionIndex, slide)SlideInserts a copy of the provided Slide at the specified index in the presentation.
insertSlide(insertionIndex, slide, linkingMode)SlideInserts a copy of the provided Slide from the source presentation into the specified index in the current presentation, and sets the slide link as specified by the SlideLinkingMode.
removeEditor(emailAddress)PresentationRemoves the given user from the list of editors for the Presentation.
removeEditor(user)PresentationRemoves the given user from the list of editors for the Presentation.
removeViewer(emailAddress)PresentationRemoves the given user from the list of viewers and commenters for the Presentation.
removeViewer(user)PresentationRemoves the given user from the list of viewers and commenters for the Presentation.
replaceAllText(findText, replaceText)IntegerReplaces all instances of text matching find text with replace text.
replaceAllText(findText, replaceText, matchCase)IntegerReplaces all instances of text matching find text with replace text.
saveAndClose()voidSaves the current Presentation.
setName(name)voidSets the name or title of the presentation.

Selection

Methods

MethodReturn typeBrief description
getCurrentPage()PageReturns the currently active Page or null if there is no active page.
getPageElementRange()PageElementRangeReturns the PageElementRange collection of PageElement instances that are selected or null if there are no PageElement instances selected.
getPageRange()PageRangeReturns the PageRange a collection of Page instances in the flimstrip that are selected or null if the selection is not of type SelectionType.PAGE.
getSelectionType()SelectionTypeReturns the SelectionType.
getTableCellRange()TableCellRangeReturns the TableCellRange collection of TableCell instances that are selected or null if there are no TableCell instances selected.
getTextRange()TextRangeReturns the TextRange that is selected or null if the selection is not of type SelectionType.TEXT.

SelectionType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA selection type that is not supported.
NONEEnumNo selection.
TEXTEnumText selection.
TABLE_CELLEnumTable cell selection.
PAGEEnumPage selection in the thumbnail flimstrip.
PAGE_ELEMENTEnumPage element selection.
CURRENT_PAGEEnumCurrent page selection.

Shape

Methods

MethodReturn typeBrief description
alignOnPage(alignmentPosition)ShapeAligns the element to the specified alignment position on the page.
bringForward()ShapeBrings the page element forward on the page by one element.
bringToFront()ShapeBrings the page element to the front of the page.
duplicate()PageElementDuplicates the page element.
getAutofit()AutofitReturns the Autofit of the text within this shape.
getBorder()BorderReturns the Border of the shape.
getConnectionSites()ConnectionSite[]Returns the list of ConnectionSites on the page element, or an empty list if the page element does not have any connection sites.
getContentAlignment()ContentAlignmentReturns the ContentAlignment of the text in the shape.
getDescription()StringReturns the page element's alt text description.
getFill()FillReturns the Fill of the shape.
getHeight()NumberGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight()NumberReturns the element's inherent height in points.
getInherentWidth()NumberReturns the element's inherent width in points.
getLeft()NumberReturns the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
getLink()LinkReturns the Link or null if there is no link.
getObjectId()StringReturns the unique ID for this object.
getPageElementType()PageElementTypeReturns the page element's type, represented as a PageElementType enum.
getParentGroup()GroupReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage()PageReturns the page this page element is on.
getParentPlaceholder()PageElementReturns the parent page element of the placeholder.
getPlaceholderIndex()IntegerReturns the placeholder index of the shape.
getPlaceholderType()PlaceholderTypeReturns the placeholder type of the shape, or PlaceholderType.NONE if the shape is not a placeholder.
getRotation()NumberReturns the element's clockwise rotation angle around its center in degrees, where zero degrees means no rotation.
getShapeType()ShapeTypeReturns the type of the shape.
getText()TextRangeReturns the text content of the shape.
getTitle()StringReturns the page element's alt text title.
getTop()NumberGets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
getTransform()AffineTransformReturns the page element's transform.
getWidth()NumberReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform)ShapePreconcatenates the provided transform to the existing transform of the page element.
remove()voidRemoves the page element.
removeLink()voidRemoves a Link.
replaceWithImage(blobSource)ImageReplaces this shape with an image provided by a BlobSource.
replaceWithImage(blobSource, crop)ImageReplaces this shape with an image provided by a BlobSource.
replaceWithImage(imageUrl)ImageReplaces this shape with an image.
replaceWithImage(imageUrl, crop)ImageReplaces this shape with an image.
replaceWithSheetsChart(sourceChart)SheetsChartReplaces this shape with a Google Sheets chart.
replaceWithSheetsChartAsImage(sourceChart)ImageReplaces this shape with an image of a Google Sheets chart.
scaleHeight(ratio)ShapeScales the element's height by the specified ratio.
scaleWidth(ratio)ShapeScales the element's width by the specified ratio.
select()voidSelects only the PageElement in the active presentation and removes any previous selection.
select(replace)voidSelects the PageElement in the active presentation.
sendBackward()ShapeSends the page element backward on the page by one element.
sendToBack()ShapeSends the page element to the back of the page.
setContentAlignment(contentAlignment)ShapeSets the ContentAlignment of the text in the shape.
setDescription(description)ShapeSets the page element's alt text description.
setHeight(height)ShapeSets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left)ShapeSets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setLinkSlide(slideIndex)LinkSets a Link to the given Slide using the zero-based index of the slide.
setLinkSlide(slide)LinkSets a Link to the given Slide, the link is set by the given slide ID.
setLinkSlide(slidePosition)LinkSets a Link to the given Slide using the relative position of the slide.
setLinkUrl(url)LinkSets a Link to the given non-empty URL string.
setRotation(angle)ShapeSets the element's clockwise rotation angle around its center in degrees.
setTitle(title)ShapeSets the page element's alt text title.
setTop(top)ShapeSets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform)ShapeSets the transform of the page element with the provided transform.
setWidth(width)ShapeSets the element's width in points, which is the width of the element's bounding box when the element has no rotation.

ShapeType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA shape type that is not supported.
TEXT_BOXEnumText box shape.
RECTANGLEEnumRectangle shape.
ROUND_RECTANGLEEnumRound corner rectangle shape.
ELLIPSEEnumEllipse shape.
ARCEnumCurved arc shape.
BENT_ARROWEnumBent arrow shape.
BENT_UP_ARROWEnumBent up arrow shape.
BEVELEnumBevel shape.
BLOCK_ARCEnumBlock arc shape.
BRACE_PAIREnumBrace pair shape.
BRACKET_PAIREnumBracket pair shape.
CANEnumCan shape.
CHEVRONEnumChevron shape.
CHORDEnumChord shape.
CLOUDEnumCloud shape.
CORNEREnumCorner shape.
CUBEEnumCube shape.
CURVED_DOWN_ARROWEnumCurved down arrow shape.
CURVED_LEFT_ARROWEnumCurved left arrow shape.
CURVED_RIGHT_ARROWEnumCurved right arrow shape.
CURVED_UP_ARROWEnumCurved up arrow shape.
DECAGONEnumDecagon shape.
DIAGONAL_STRIPEEnumDiagonal stripe shape.
DIAMONDEnumDiamond shape.
DODECAGONEnumDodecagon shape.
DONUTEnumDonut shape.
DOUBLE_WAVEEnumDouble wave shape.
DOWN_ARROWEnumDown arrow shape.
DOWN_ARROW_CALLOUTEnumCallout down arrow shape.
FOLDED_CORNEREnumFolded corner shape.
FRAMEEnumFrame shape.
HALF_FRAMEEnumHalf frame shape.
HEARTEnumHeart shape.
HEPTAGONEnumHeptagon shape.
HEXAGONEnumHexagon shape.
HOME_PLATEEnumHome plate shape.
HORIZONTAL_SCROLLEnumHorizontal scroll shape.
IRREGULAR_SEAL_1EnumIrregular seal 1 shape.
IRREGULAR_SEAL_2EnumIrregular seal 2 shape.
LEFT_ARROWEnumLeft arrow shape.
LEFT_ARROW_CALLOUTEnumCallout left arrow shape.
LEFT_BRACEEnumLeft brace shape.
LEFT_BRACKETEnumLeft bracket shape.
LEFT_RIGHT_ARROWEnumLeft right arrow shape.
LEFT_RIGHT_ARROW_CALLOUTEnumCallout left right arrow shape.
LEFT_RIGHT_UP_ARROWEnumLeft right up arrow shape.
LEFT_UP_ARROWEnumLeft up arrow shape.
LIGHTNING_BOLTEnumLightning bolt shape.
MATH_DIVIDEEnumDivide math shape.
MATH_EQUALEnumEqual math shape.
MATH_MINUSEnumMinus math shape.
MATH_MULTIPLYEnumMultiply math shape.
MATH_NOT_EQUALEnumNot equal math shape.
MATH_PLUSEnumPlus math shape.
MOONEnumMoon shape.
NO_SMOKINGEnumNo smoking shape.
NOTCHED_RIGHT_ARROWEnumNotched right arrow shape.
OCTAGONEnumOctagon shape.
PARALLELOGRAMEnumParallelogram shape.
PENTAGONEnumPentagon shape.
PIEEnumPie shape.
PLAQUEEnumPlaque shape.
PLUSEnumPlus shape.
QUAD_ARROWEnumQuad-arrow shape.
QUAD_ARROW_CALLOUTEnumCallout quad-arrow shape.
RIBBONEnumRibbon shape.
RIBBON_2EnumRibbon 2 shape.
RIGHT_ARROWEnumRight arrow shape.
RIGHT_ARROW_CALLOUTEnumCallout right arrow shape.
RIGHT_BRACEEnumRight brace shape.
RIGHT_BRACKETEnumRight bracket shape.
ROUND_1_RECTANGLEEnumOne round corner rectangle shape.
ROUND_2_DIAGONAL_RECTANGLEEnumTwo diagonal round corner rectangle shape.
ROUND_2_SAME_RECTANGLEEnumTwo same-side round corner rectangle shape.
RIGHT_TRIANGLEEnumRight triangle shape.
SMILEY_FACEEnumSmiley face shape.
SNIP_1_RECTANGLEEnumOne snip corner rectangle shape.
SNIP_2_DIAGONAL_RECTANGLEEnumTwo diagonal snip corner rectangle shape.
SNIP_2_SAME_RECTANGLEEnumTwo same-side snip corner rectangle shape.
SNIP_ROUND_RECTANGLEEnumOne snip one round corner rectangle shape.
STAR_10EnumTen pointed star shape.
STAR_12EnumTwelve pointed star shape.
STAR_16EnumSixteen pointed star shape.
STAR_24EnumTwenty four pointed star shape.
STAR_32EnumThirty two pointed star shape.
STAR_4EnumFour pointed star shape.
STAR_5EnumFive pointed star shape.
STAR_6EnumSix pointed star shape.
STAR_7EnumSeven pointed star shape.
STAR_8EnumEight pointed star shape.
STRIPED_RIGHT_ARROWEnumStriped right arrow shape.
SUNEnumSun shape.
TRAPEZOIDEnumTrapezoid shape.
TRIANGLEEnumTriangle shape.
UP_ARROWEnumUp arrow shape.
UP_ARROW_CALLOUTEnumCallout up arrow shape.
UP_DOWN_ARROWEnumUp down arrow shape.
UTURN_ARROWEnumU-turn arrow shape.
VERTICAL_SCROLLEnumVertical scroll shape.
WAVEEnumWave shape.
WEDGE_ELLIPSE_CALLOUTEnumCallout wedge ellipse shape.
WEDGE_RECTANGLE_CALLOUTEnumCallout wedge rectangle shape.
WEDGE_ROUND_RECTANGLE_CALLOUTEnumCallout wedge round rectangle shape.
FLOW_CHART_ALTERNATE_PROCESSEnumAlternate process flow shape.
FLOW_CHART_COLLATEEnumCollate flow shape.
FLOW_CHART_CONNECTOREnumConnector flow shape.
FLOW_CHART_DECISIONEnumDecision flow shape.
FLOW_CHART_DELAYEnumDelay flow shape.
FLOW_CHART_DISPLAYEnumDisplay flow shape.
FLOW_CHART_DOCUMENTEnumDocument flow shape.
FLOW_CHART_EXTRACTEnumExtract flow shape.
FLOW_CHART_INPUT_OUTPUTEnumInput output flow shape.
FLOW_CHART_INTERNAL_STORAGEEnumInternal storage flow shape.
FLOW_CHART_MAGNETIC_DISKEnumMagnetic disk flow shape.
FLOW_CHART_MAGNETIC_DRUMEnumMagnetic drum flow shape.
FLOW_CHART_MAGNETIC_TAPEEnumMagnetic tape flow shape.
FLOW_CHART_MANUAL_INPUTEnumManual input flow shape.
FLOW_CHART_MANUAL_OPERATIONEnumManual operation flow shape.
FLOW_CHART_MERGEEnumMerge flow shape.
FLOW_CHART_MULTIDOCUMENTEnumMulti-document flow shape.
FLOW_CHART_OFFLINE_STORAGEEnumOffline storage flow shape.
FLOW_CHART_OFFPAGE_CONNECTOREnumOff-page connector flow shape.
FLOW_CHART_ONLINE_STORAGEEnumOnline storage flow shape.
FLOW_CHART_OREnumOr flow shape.
FLOW_CHART_PREDEFINED_PROCESSEnumPredefined process flow shape.
FLOW_CHART_PREPARATIONEnumPreparation flow shape.
FLOW_CHART_PROCESSEnumProcess flow shape.
FLOW_CHART_PUNCHED_CARDEnumPunched card flow shape.
FLOW_CHART_PUNCHED_TAPEEnumPunched tape flow shape.
FLOW_CHART_SORTEnumSort flow shape.
FLOW_CHART_SUMMING_JUNCTIONEnumSumming junction flow shape.
FLOW_CHART_TERMINATOREnumTerminator flow shape.
ARROW_EASTEnumEast arrow shape.
ARROW_NORTH_EASTEnumNortheast arrow shape.
ARROW_NORTHEnumNorth arrow shape.
SPEECHEnumSpeech shape.
STARBURSTEnumStar burst shape.
TEARDROPEnumTeardrop shape.
ELLIPSE_RIBBONEnumEllipse ribbon shape.
ELLIPSE_RIBBON_2EnumEllipse ribbon 2 shape.
CLOUD_CALLOUTEnumCallout cloud shape.
CUSTOMEnumCustom shape.

SheetsChart

Methods

MethodReturn typeBrief description
alignOnPage(alignmentPosition)SheetsChartAligns the element to the specified alignment position on the page.
asImage()ImageReturns the chart as an image or null if the chart is not an embedded image.
bringForward()SheetsChartBrings the page element forward on the page by one element.
bringToFront()SheetsChartBrings the page element to the front of the page.
duplicate()PageElementDuplicates the page element.
getChartId()IntegerGets the ID of the specific chart in the Google Sheets spreadsheet that is embedded.
getConnectionSites()ConnectionSite[]Returns the list of ConnectionSites on the page element, or an empty list if the page element does not have any connection sites.
getDescription()StringReturns the page element's alt text description.
getEmbedType()SheetsChartEmbedTypeReturns the embed type of the Sheets chart.
getHeight()NumberGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight()NumberReturns the element's inherent height in points.
getInherentWidth()NumberReturns the element's inherent width in points.
getLeft()NumberReturns the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
getLink()LinkReturns the Link or null if there is no link.
getObjectId()StringReturns the unique ID for this object.
getPageElementType()PageElementTypeReturns the page element's type, represented as a PageElementType enum.
getParentGroup()GroupReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage()PageReturns the page this page element is on.
getRotation()NumberReturns the element's clockwise rotation angle around its center in degrees, where zero degrees means no rotation.
getSpreadsheetId()StringGets the ID of the Google Sheets spreadsheet that contains the source chart.
getTitle()StringReturns the page element's alt text title.
getTop()NumberGets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
getTransform()AffineTransformReturns the page element's transform.
getWidth()NumberReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform)SheetsChartPreconcatenates the provided transform to the existing transform of the page element.
refresh()voidRefreshes the chart by replacing it with the latest version of the chart from Google Sheets.
remove()voidRemoves the page element.
removeLink()voidRemoves a Link.
scaleHeight(ratio)SheetsChartScales the element's height by the specified ratio.
scaleWidth(ratio)SheetsChartScales the element's width by the specified ratio.
select()voidSelects only the PageElement in the active presentation and removes any previous selection.
select(replace)voidSelects the PageElement in the active presentation.
sendBackward()SheetsChartSends the page element backward on the page by one element.
sendToBack()SheetsChartSends the page element to the back of the page.
setDescription(description)SheetsChartSets the page element's alt text description.
setHeight(height)SheetsChartSets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left)SheetsChartSets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setLinkSlide(slideIndex)LinkSets a Link to the given Slide using the zero-based index of the slide.
setLinkSlide(slide)LinkSets a Link to the given Slide, the link is set by the given slide ID.
setLinkSlide(slidePosition)LinkSets a Link to the given Slide using the relative position of the slide.
setLinkUrl(url)LinkSets a Link to the given non-empty URL string.
setRotation(angle)SheetsChartSets the element's clockwise rotation angle around its center in degrees.
setTitle(title)SheetsChartSets the page element's alt text title.
setTop(top)SheetsChartSets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform)SheetsChartSets the transform of the page element with the provided transform.
setWidth(width)SheetsChartSets the element's width in points, which is the width of the element's bounding box when the element has no rotation.

SheetsChartEmbedType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumRepresents a chart that is not supported and cannot be further classified.
IMAGEEnumIndicates that the chart is embedded as an image.

Slide

Methods

MethodReturn typeBrief description
duplicate()SlideDuplicates the slide.
getBackground()PageBackgroundGets the page's background.
getColorScheme()ColorSchemeGets the ColorScheme associated with the page.
getGroups()Group[]Returns the list of Group objects on the page.
getImages()Image[]Returns the list of Image objects on the page.
getLayout()LayoutGets the layout that the slide is based on or null if the slide is not based on a layout.
getLines()Line[]Returns the list of Line objects on the page.
getNotesPage()NotesPageReturns the notes page associated with the slide.
getObjectId()StringGets the unique ID for the page.
getPageElementById(id)PageElementReturns the PageElement on the page with the given ID, or null if none exists.
getPageElements()PageElement[]Returns the list of PageElement objects rendered on the page.
getPageType()PageTypeGets the type of the page.
getPlaceholder(placeholderType)PageElementReturns the placeholder PageElement object for a specified PlaceholderType or null if a matching placeholder is not present.
getPlaceholder(placeholderType, placeholderIndex)PageElementReturns the placeholder PageElement object for a specified PlaceholderType and a placeholder index, or null if the placeholder is not present.
getPlaceholders()PageElement[]Returns the list of placeholder PageElement objects in the page.
getShapes()Shape[]Returns the list of Shape objects on the page.
getSheetsCharts()SheetsChart[]Returns the list of SheetsChart objects on the page.
getSlideLinkingMode()SlideLinkingModeReturns a SlideLinkingMode indicating if the slide is linked to another slide.
getSourcePresentationId()StringReturns the source Presentation ID or null if the slide is not linked.
getSourceSlideObjectId()StringReturns the source slide ID or null if the slide is not linked.
getTables()Table[]Returns the list of Table objects on the page.
getVideos()Video[]Returns the list of Video objects on the page.
getWordArts()WordArt[]Returns the list of WordArt objects on the page.
group(pageElements)GroupGroups all the specified page elements.
insertGroup(group)GroupInserts a copy of the provided Group on the page.
insertImage(blobSource)ImageInserts an image at the top left corner of the page with a default size from the specified image blob.
insertImage(blobSource, left, top, width, height)ImageInserts an image on the page with the provided position and size from the specified image blob.
insertImage(image)ImageInserts a copy of the provided Image on the page.
insertImage(imageUrl)ImageInserts an image at the top left corner of the page with a default size from the provided URL.
insertImage(imageUrl, left, top, width, height)ImageInserts an image on the page with the provided position and size from the provided URL.
insertLine(line)LineInserts a copy of the provided Line on the page.
insertLine(lineCategory, startConnectionSite, endConnectionSite)LineInserts a line on the page connecting two connection sites.
insertLine(lineCategory, startLeft, startTop, endLeft, endTop)LineInserts a line on the page.
insertPageElement(pageElement)PageElementInserts a copy of the provided PageElement on the page.
insertShape(shape)ShapeInserts a copy of the provided Shape on the page.
insertShape(shapeType)ShapeInserts a shape on the page.
insertShape(shapeType, left, top, width, height)ShapeInserts a shape on the page.
insertSheetsChart(sourceChart)SheetsChartInserts a Google Sheets chart on the page.
insertSheetsChart(sourceChart, left, top, width, height)SheetsChartInserts a Google Sheets chart on the page with the provided position and size.
insertSheetsChart(sheetsChart)SheetsChartInserts a copy of the provided SheetsChart on the page.
insertSheetsChartAsImage(sourceChart)ImageInserts a Google Sheets chart as an Image on the page.
insertSheetsChartAsImage(sourceChart, left, top, width, height)ImageInserts a Google Sheets chart as an Image on the page with the provided position and size.
insertTable(numRows, numColumns)TableInserts a table on the page.
insertTable(numRows, numColumns, left, top, width, height)TableInserts a table on the page with the provided position and size.
insertTable(table)TableInserts a copy of the provided Table on the page.
insertTextBox(text)ShapeInserts a text box Shape containing the provided string on the page.
insertTextBox(text, left, top, width, height)ShapeInserts a text box Shape containing the provided string on the page.
insertVideo(videoUrl)VideoInserts a video at the top left corner of the page with a default size.
insertVideo(videoUrl, left, top, width, height)VideoInserts a video on the page with the provided position and size.
insertVideo(video)VideoInserts a copy of the provided Video on the page.
insertWordArt(wordArt)WordArtInserts a copy of the provided WordArt on the page.
isSkipped()BooleanReturns whether the slide is skipped in the presentation mode.
move(index)voidMove the slide to the specified index.
refreshSlide()voidRefreshes the slide to reflect any changes made to the linked source slide.
remove()voidRemoves the page.
replaceAllText(findText, replaceText)IntegerReplaces all instances of text matching find text with replace text.
replaceAllText(findText, replaceText, matchCase)IntegerReplaces all instances of text matching find text with replace text.
selectAsCurrentPage()voidSelects the Page in the active presentation as the current page selection and removes any previous selection.
setSkipped(isSkipped)voidSets whether the slide is skipped in the presentation mode.
unlink()voidUnlinks the current Slide from its source slide.

SlideLinkingMode

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA slide linking mode that isn't supported.
LINKEDEnumIndicates that slides are linked.
NOT_LINKEDEnumIndicates that slides aren't linked.

SlidePosition

Properties

PropertyTypeDescription
NEXT_SLIDEEnumThe next slide.
PREVIOUS_SLIDEEnumThe previous slide.
FIRST_SLIDEEnumThe first slide in the presentation.
LAST_SLIDEEnumThe last slide in the presentation.

SlidesApp

Properties

PropertyTypeDescription
AlignmentPositionAlignmentPositionAn enumeration of the types of alignment positions.
ArrowStyleArrowStyleAn enumeration of the different arrow styles that a Line can have.
AutoTextTypeAutoTextTypeAn enumeration of the types of auto text.
AutofitTypeAutofitTypeAn enumeration of autofit types.
CellMergeStateCellMergeStateAn enumeration of the different merge states of a table cell.
ColorTypeColorTypeAn enumeration of color types.
ContentAlignmentContentAlignmentAn enumeration of values used to specify content alignment.
DashStyleDashStyleAn enumeration of the different dash styles that a Line can have.
FillTypeFillTypeAn enumeration of fill types.
LineCategoryLineCategoryAn enumeration of the categories of Line.
LineFillTypeLineFillTypeAn enumeration of the types of LineFill.
LineTypeLineTypeAn enumeration of the types of Line.
LinkTypeLinkTypeAn enumeration of the types of links.
ListPresetListPresetAn enumeration of the types of list presets.
PageBackgroundTypePageBackgroundTypeAn enumeration of the types of page backgrounds.
PageElementTypePageElementTypeAn enumeration of the types of page elements.
PageTypePageTypeAn enumeration of the types of pages.
ParagraphAlignmentParagraphAlignmentAn enumeration of the types of paragraph alignment.
PlaceholderTypePlaceholderTypeAn enumeration of the types of placeholders.
PredefinedLayoutPredefinedLayoutAn enumeration of the predefined layouts.
SelectionTypeSelectionTypeAn enumeration of the types of selections.
ShapeTypeShapeTypeAn enumeration of the types of shapes.
SheetsChartEmbedTypeSheetsChartEmbedTypeAn enumeration of Sheets chart embed types.
SlideLinkingModeSlideLinkingModeAn enumeration of the ways Slides can be linked.
SlidePositionSlidePositionAn enumeration of the types of slide positions.
SpacingModeSpacingModeAn enumeration of the types of spacing modes.
TextBaselineOffsetTextBaselineOffsetAn enumeration of the types of text baseline offset.
TextDirectionTextDirectionAn enumeration of the types of text directions.
ThemeColorTypeThemeColorTypeAn enumeration of theme colors.
VideoSourceTypeVideoSourceTypeAn enumeration of the types of video source.

Methods

MethodReturn typeBrief description
create(name)PresentationCreates and opens a new Presentation.
getActivePresentation()PresentationReturns the currently active presentation to which the script is container-bound, or null if there is no active presentation.
getUi()UiReturns an instance of the presentation's user-interface environment that allows the script to add features like menus, dialogs, and sidebars.
newAffineTransformBuilder()AffineTransformBuilderReturns a new AffineTransformBuilder to build an AffineTransform.
openById(id)PresentationOpens the Presentation with the given ID.
openByUrl(url)PresentationOpens the Presentation with the given URL.

SolidFill

Methods

MethodReturn typeBrief description
getAlpha()NumberGet the opacity of the color, in the interval from [0, 1.0], where 1.0 means fully opaque.
getColor()ColorGet the color of the fill.

SpacingMode

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA spacing mode that is not supported.
NEVER_COLLAPSEEnumParagraph spacing is always rendered.
COLLAPSE_LISTSEnumParagraph spacing is skipped between list elements.

SpeakerSpotlight

Methods

MethodReturn typeBrief description
alignOnPage(alignmentPosition)SpeakerSpotlightAligns the element to the specified alignment position on the page.
bringForward()SpeakerSpotlightBrings the page element forward on the page by one element.
bringToFront()SpeakerSpotlightBrings the page element to the front of the page.
duplicate()PageElementDuplicates the page element.
getBorder()BorderReturns the Border of the speaker spotlight.
getConnectionSites()ConnectionSite[]Returns the list of ConnectionSites on the page element, or an empty list if the page element does not have any connection sites.
getDescription()StringReturns the page element's alt text description.
getHeight()NumberGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight()NumberReturns the element's inherent height in points.
getInherentWidth()NumberReturns the element's inherent width in points.
getLeft()NumberReturns the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
getMaskShapeType()ShapeTypeReturns the ShapeType of the mask applied to the speaker spotlight, or null if there is no mask.
getObjectId()StringReturns the unique ID for this object.
getPageElementType()PageElementTypeReturns the page element's type, represented as a PageElementType enum.
getParentGroup()GroupReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage()PageReturns the page this page element is on.
getRotation()NumberReturns the element's clockwise rotation angle around its center in degrees, where zero degrees means no rotation.
getTitle()StringReturns the page element's alt text title.
getTop()NumberGets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
getTransform()AffineTransformReturns the page element's transform.
getWidth()NumberReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform)SpeakerSpotlightPreconcatenates the provided transform to the existing transform of the page element.
remove()voidRemoves the page element.
scaleHeight(ratio)SpeakerSpotlightScales the element's height by the specified ratio.
scaleWidth(ratio)SpeakerSpotlightScales the element's width by the specified ratio.
select()voidSelects only the PageElement in the active presentation and removes any previous selection.
select(replace)voidSelects the PageElement in the active presentation.
sendBackward()SpeakerSpotlightSends the page element backward on the page by one element.
sendToBack()SpeakerSpotlightSends the page element to the back of the page.
setDescription(description)SpeakerSpotlightSets the page element's alt text description.
setHeight(height)SpeakerSpotlightSets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left)SpeakerSpotlightSets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setRotation(angle)SpeakerSpotlightSets the element's clockwise rotation angle around its center in degrees.
setTitle(title)SpeakerSpotlightSets the page element's alt text title.
setTop(top)SpeakerSpotlightSets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform)SpeakerSpotlightSets the transform of the page element with the provided transform.
setWidth(width)SpeakerSpotlightSets the element's width in points, which is the width of the element's bounding box when the element has no rotation.

Table

Methods

MethodReturn typeBrief description
alignOnPage(alignmentPosition)TableAligns the element to the specified alignment position on the page.
appendColumn()TableColumnAppends a new column to the right of the last column of the table.
appendRow()TableRowAppends a new row below the last row of the table.
bringForward()TableBrings the page element forward on the page by one element.
bringToFront()TableBrings the page element to the front of the page.
duplicate()PageElementDuplicates the page element.
getCell(rowIndex, columnIndex)TableCellReturns the specified cell in the table.
getColumn(columnIndex)TableColumnReturns the specified column in the table.
getConnectionSites()ConnectionSite[]Returns the list of ConnectionSites on the page element, or an empty list if the page element does not have any connection sites.
getDescription()StringReturns the page element's alt text description.
getHeight()NumberGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight()NumberReturns the element's inherent height in points.
getInherentWidth()NumberReturns the element's inherent width in points.
getLeft()NumberReturns the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
getNumColumns()IntegerReturns the number of columns in the table.
getNumRows()IntegerReturns the number of rows in the table.
getObjectId()StringReturns the unique ID for this object.
getPageElementType()PageElementTypeReturns the page element's type, represented as a PageElementType enum.
getParentGroup()GroupReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage()PageReturns the page this page element is on.
getRotation()NumberReturns the element's clockwise rotation angle around its center in degrees, where zero degrees means no rotation.
getRow(rowIndex)TableRowReturns the specified row in the table.
getTitle()StringReturns the page element's alt text title.
getTop()NumberGets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
getTransform()AffineTransformReturns the page element's transform.
getWidth()NumberReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
insertColumn(index)TableColumnInserts a new column at the specified index of the table.
insertRow(index)TableRowInserts a new row at the specified index of the table.
preconcatenateTransform(transform)TablePreconcatenates the provided transform to the existing transform of the page element.
remove()voidRemoves the page element.
scaleHeight(ratio)TableScales the element's height by the specified ratio.
scaleWidth(ratio)TableScales the element's width by the specified ratio.
select()voidSelects only the PageElement in the active presentation and removes any previous selection.
select(replace)voidSelects the PageElement in the active presentation.
sendBackward()TableSends the page element backward on the page by one element.
sendToBack()TableSends the page element to the back of the page.
setDescription(description)TableSets the page element's alt text description.
setHeight(height)TableSets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left)TableSets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setRotation(angle)TableSets the element's clockwise rotation angle around its center in degrees.
setTitle(title)TableSets the page element's alt text title.
setTop(top)TableSets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform)TableSets the transform of the page element with the provided transform.
setWidth(width)TableSets the element's width in points, which is the width of the element's bounding box when the element has no rotation.

TableCell

Methods

MethodReturn typeBrief description
getColumnIndex()IntegerReturns the 0-based column index of the table cell.
getColumnSpan()IntegerReturns the column span of the table cell.
getContentAlignment()ContentAlignmentReturns the ContentAlignment of the text in the table cell.
getFill()FillReturns the fill of the table cell.
getHeadCell()TableCellReturns the head cell of this table cell.
getMergeState()CellMergeStateReturns the merge state of the table cell.
getParentColumn()TableColumnReturns the table column containing the current cell.
getParentRow()TableRowReturns the table row containing the current cell.
getParentTable()TableReturns the table containing the current cell.
getRowIndex()IntegerReturns the 0-based row index of the table cell.
getRowSpan()IntegerReturns the row span of the table cell.
getText()TextRangeReturns the text content of the table cell.
setContentAlignment(contentAlignment)TableCellSets the ContentAlignment of the text in the table cell.

TableCellRange

Methods

MethodReturn typeBrief description
getTableCells()TableCell[]Returns the list of TableCell instances.

TableColumn

Methods

MethodReturn typeBrief description
getCell(cellIndex)TableCellReturns the cell at the specified index.
getIndex()IntegerReturns the 0-based index of the column.
getNumCells()IntegerReturns the number of cells in this column.
getParentTable()TableReturns the table containing the current column.
getWidth()NumberReturns the width of the column in points.
remove()voidRemoves the table column.

TableRow

Methods

MethodReturn typeBrief description
getCell(cellIndex)TableCellReturns the cell at the specified index.
getIndex()IntegerReturns the 0-based index of the row.
getMinimumHeight()NumberReturns the minimum height of the row in points.
getNumCells()IntegerReturns the number of cells in this row.
getParentTable()TableReturns the table containing the current row.
remove()voidRemoves the table row.

TextBaselineOffset

Properties

PropertyTypeDescription
UNSUPPORTEDEnumAn text baseline offset that is not supported.
NONEEnumThe text is not vertically offset.
SUPERSCRIPTEnumThe text is vertically offset upwards.
SUBSCRIPTEnumThe text is vertically offset downwards.

TextDirection

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA text direction that is not supported.
LEFT_TO_RIGHTEnumThe text goes from left to right.
RIGHT_TO_LEFTEnumThe text goes from right to left.

TextRange

Methods

MethodReturn typeBrief description
appendParagraph(text)ParagraphAppends a paragraph at the end of the text range.
appendRange(textRange)TextRangeAppends a copy of the provided text range to the end of the current text range.
appendRange(textRange, matchSourceFormatting)TextRangeAppends a copy of the provided text range to the end of the current text range.
appendText(text)TextRangeAppends text at the end of the text range.
asRenderedString()StringReturns the rendered text bounded by this range of the associated shape or table cell in a format appropriate to display to end users.
asString()StringReturns the raw text bounded by this range of the associated shape or table cell.
clear()voidClears the text bounded by this range.
clear(startOffset, endOffset)voidClears the text bounded by the start and end offsets in the range.
find(pattern)TextRange[]Returns all the ranges matching the search pattern in the current text range.
find(pattern, startOffset)TextRange[]Returns all the ranges matching the search pattern in the current text range starting from the start offset.
getAutoTexts()AutoText[]Returns the auto texts within the current text range.
getEndIndex()IntegerReturns the exclusive, 0-based index for the last character in this range.
getLength()IntegerReturns the number of characters in this range.
getLinks()TextRange[]Returns a collection of text ranges that correspond to all Links within the current text range or overlapping the current text range.
getListParagraphs()Paragraph[]Returns the paragraphs in lists that overlap the current text range.
getListStyle()ListStyleReturns the ListStyle of the current text range.
getParagraphStyle()ParagraphStyleReturns the ParagraphStyle of the current text range.
getParagraphs()Paragraph[]Returns the paragraphs that overlap the current text range.
getRange(startOffset, endOffset)TextRangeReturns a new TextRange covering part of the range from which it is derived.
getRuns()TextRange[]Returns the text runs that overlap the current text range.
getStartIndex()IntegerReturns the inclusive, 0-based index for the first character in this range.
getTextStyle()TextStyleReturns the text style of the range, or null if the range is empty.
insertParagraph(startOffset, text)ParagraphInserts a paragraph at the start offset.
insertRange(startOffset, textRange)TextRangeInserts a copy of the provided text range at the start offset.
insertRange(startOffset, textRange, matchSourceFormatting)TextRangeInserts a copy of the provided text range at the start offset.
insertText(startOffset, text)TextRangeInserts text at the start offset.
isEmpty()BooleanReturns true if there are no characters in this range, and returns false otherwise.
replaceAllText(findText, replaceText)IntegerReplaces all instances of text matching find text with replace text.
replaceAllText(findText, replaceText, matchCase)IntegerReplaces all instances of text matching find text with replace text.
select()voidSelects only the TextRange in the active presentation and removes any previous selection.
setText(newText)TextRangeSets the text bounded by this range of the associated shape or table cell.

TextStyle

Methods

MethodReturn typeBrief description
getBackgroundColor()ColorReturns the background color of the text, or null if there are multiple styles on the text.
getBaselineOffset()Text