Slides Service

  • The Google Slides service for Apps Script enables creation, access, and modification of presentations through various classes and methods.

  • Key classes like PageElement and Shape provide extensive methods for manipulating visual elements such as position, size, rotation, and ordering.

  • Classes like TextRange and TextStyle offer detailed control over text content and appearance within shapes and tables.

  • Specialized classes like Image, Line, Table, Video, and WordArt provide methods specific to interacting with those particular element types.

  • The SlidesApp class acts as the main entry point, allowing creation and opening of presentations and providing access to various enumerations and builder classes.

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
AffineTransform A 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 ]
AffineTransformBuilder A builder for AffineTransform objects.
AlignmentPosition The alignment position to apply.
ArrowStyle The kinds of start and end forms with which linear geometry can be rendered.
AutoText An element of text that is dynamically replaced with content that can change over time, such as a slide number.
AutoTextType The types of auto text.
Autofit Describes the autofit settings of a shape.
AutofitType The autofit types.
Border Describes the border around an element.
CellMergeState The table cell merge states.
Color An opaque color
ColorScheme A color scheme defines a mapping from members of ThemeColorType to the actual colors used to render them.
ConnectionSite The connection site on a PageElement that can connect to a connector .
ContentAlignment The content alignments for a Shape or TableCell .
DashStyle The kinds of dashes with which linear geometry can be rendered.
Fill Describes the page element's background
FillType The kinds of fill.
Group A collection of PageElement s joined as a single unit.
Image A PageElement representing an image.
Layout A layout in a presentation.
Line A PageElement representing a line.
LineCategory The line category.
LineFill Describes the fill of a line or outline
LineFillType The kinds of line fill.
LineType The line types.
Link A hypertext link.
LinkType The types of a Link .
List A list in the text.
ListPreset Preset patterns of glyphs for lists in text.
ListStyle The list styling for a range of text.
Master A master in a presentation.
NotesMaster A notes master in a presentation.
NotesPage A notes page in a presentation.
Page A page in a presentation.
PageBackground Describes the page's background
PageBackgroundType The kinds of page backgrounds.
PageElement A visual element rendered on a page.
PageElementRange A collection of one or more PageElement instances.
PageElementType The page element type.
PageRange A collection of one or more Page instances.
PageType The page types.
Paragraph A segment of text terminated by a newline character.
ParagraphAlignment The types of text alignment for a paragraph.
ParagraphStyle The styles of text that apply to entire paragraphs.
PictureFill A fill that renders an image that's stretched to the dimensions of its container.
PlaceholderType The placeholder types.
Point A point representing a location.
PredefinedLayout Predefined layouts.
Presentation A presentation.
Selection The user's selection in the active presentation.
SelectionType Type of Selection .
Shape A PageElement representing a generic shape that does not have a more specific classification.
ShapeType The shape types.
SheetsChart A PageElement representing a linked chart embedded from Google Sheets.
SheetsChartEmbedType The Sheets chart's embed type.
Slide A slide in a presentation.
SlideLinkingMode The mode of links between slides.
SlidePosition The relative position of a Slide .
SlidesApp Creates and opens Presentations that can be edited.
SolidFill A solid color fill.
SpacingMode The different modes for paragraph spacing.
SpeakerSpotlight A PageElement representing a speaker spotlight.
Table A PageElement representing a table.
TableCell A cell in a table.
TableCellRange A collection of one or more TableCell instances.
TableColumn A column in a table.
TableRow A row in a table.
TextBaselineOffset The text vertical offset from its normal position.
TextDirection The directions text can flow in.
TextRange A segment of the text contents of a Shape or a TableCell .
TextStyle The style of text.
ThemeColor A color that refers to an entry in the page's ColorScheme .
ThemeColorType The name of an entry in the page's color scheme.
Video A PageElement representing a video.
VideoSourceType The video source types.
WordArt A 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() AffineTransformBuilder Returns a new AffineTransformBuilder based on this transform.

AffineTransformBuilder

Methods

MethodReturn typeBrief description
build() AffineTransform Creates an AffineTransform object initialized with the elements set in the builder.
setScaleX(scaleX) AffineTransformBuilder Sets the X coordinate scaling element and returns the builder.
setScaleY(scaleY) AffineTransformBuilder Sets the Y coordinate scaling element and returns the builder.
setShearX(shearX) AffineTransformBuilder Sets the X coordinate shearing element and returns the builder.
setShearY(shearY) AffineTransformBuilder Sets the Y coordinate shearing element and returns the builder.
setTranslateX(translateX) AffineTransformBuilder Sets the X coordinate translation element in points, and returns the builder.
setTranslateY(translateY) AffineTransformBuilder Sets 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() AutoTextType|nullReturns the type of auto text.
getIndex() Integer|nullReturns the index of the auto text.
getRange() TextRange|nullReturns 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() Autofit Sets the AutofitType of a shape to AutofitType.NONE .
getAutofitType() AutofitType Gets 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() DashStyle|nullGets the DashStyle of the border.
getLineFill() LineFill Gets the LineFill of the border.
getWeight() Number|nullGets the thickness of the border in points.
isVisible() BooleanGets whether the border is visible or not.
setDashStyle(style) Border Sets the DashStyle of the border.
setTransparent() Border Sets the border to be transparent.
setWeight(points) Border Sets the thickness of the border in points.

CellMergeState

Properties

PropertyTypeDescription
NORMALEnumThe cell is not merged.
HEADEnumThe cell is merged and it is the head (for example, upper left) cell within the merged set of cells.
MERGEDEnumThe cell is merged but is not the head (for example, upper left) cell.

Color

Methods

MethodReturn typeBrief description
asRgbColor() RgbColor Converts this color to an RgbColor .
asThemeColor() ThemeColor Converts this color to a ThemeColor .
getColorType() ColorType Get the type of this color.

ColorScheme

Methods

MethodReturn typeBrief description
getConcreteColor(theme) Color Returns 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) ColorScheme Sets the concrete color associated with the ThemeColorType in this color scheme to the given color.
setConcreteColor(type, red, green, blue) ColorScheme Sets the concrete color associated with the ThemeColorType in this color scheme to the given color in RGB format.
setConcreteColor(type, hexColor) ColorScheme Sets 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() PageElement Returns 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() SolidFill|nullGet the solid fill of this background, or null if the fill type is not FillType.SOLID .
getType() FillType Get 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) Group Aligns the element to the specified alignment position on the page.
bringForward() Group Brings the page element forward on the page by one element.
bringToFront() Group Brings the page element to the front of the page.
duplicate() PageElement Duplicates 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() Number|nullGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight() Number|nullReturns the element's inherent height in points.
getInherentWidth() Number|nullReturns 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() PageElementType Returns the page element's type, represented as a PageElementType enum.
getParentGroup() Group|nullReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage() Page Returns 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() AffineTransform Gets the page element's transform.
getWidth() Number|nullReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform) Group Preconcatenates the provided transform to the existing transform of the page element.
remove() voidRemoves the page element.
scaleHeight(ratio) Group Scales the element's height by the specified ratio.
scaleWidth(ratio) Group Scales 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() Group Sends the page element backward on the page by one element.
sendToBack() Group Sends the page element to the back of the page.
setDescription(description) Group Sets the page element's alt text description.
setHeight(height) Group Sets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left) Group Sets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setRotation(angle) Group Sets the element's clockwise rotation angle around its center in degrees.
setTitle(title) Group Sets the page element's alt text title.
setTop(top) Group Sets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform) Group Sets the transform of the page element with the provided transform.
setWidth(width) Group Sets 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) Image Aligns the element to the specified alignment position on the page.
bringForward() Image Brings the page element forward on the page by one element.
bringToFront() Image Brings the page element to the front of the page.
duplicate() PageElement Duplicates the page element.
getAs(contentType) Blob Return the data inside this object as a blob converted to the specified content type.
getBlob() Blob Return the data inside this image as a blob.
getBorder() Border Returns 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() Number|nullGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight() Number|nullReturns the element's inherent height in points.
getInherentWidth() Number|nullReturns 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() Link|nullReturns the Link or null if there is no link.
getObjectId() StringReturns the unique ID for this object.
getPageElementType() PageElementType Returns the page element's type, represented as a PageElementType enum.
getParentGroup() Group|nullReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage() Page Returns the page this page element is on.
getParentPlaceholder() PageElement|nullReturns the parent page element of the placeholder.
getPlaceholderIndex() Integer|nullReturns the index of the placeholder image.
getPlaceholderType() PlaceholderType Returns 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() String|nullGets 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() AffineTransform Returns the page element's transform.
getWidth() Number|nullReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform) Image Preconcatenates the provided transform to the existing transform of the page element.
remove() voidRemoves the page element.
removeLink() voidRemoves a Link .
replace(blobSource) Image Replaces this image with an image described by a BlobSource object.
replace(blobSource, crop) Image Replaces this image with an image described by a Image object, optionally cropping the image to fit.
replace(imageUrl) Image Replaces this image with another image downloaded from the provided URL.
replace(imageUrl, crop) Image Replaces this image with another image downloaded from the provided URL, optionally cropping the image to fit.
scaleHeight(ratio) Image Scales the element's height by the specified ratio.
scaleWidth(ratio) Image Scales 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() Image Sends the page element backward on the page by one element.
sendToBack() Image Sends the page element to the back of the page.
setDescription(description) Image Sets the page element's alt text description.
setHeight(height) Image Sets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left) Image Sets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setLinkSlide(slideIndex) Link Sets a Link to the given Slide using the zero-based index of the slide.
setLinkSlide(slide) Link Sets a Link to the given Slide , the link is set by the given slide ID.
setLinkSlide(slidePosition) Link Sets a Link to the given Slide using the relative position of the slide.
setLinkUrl(url) Link Sets a Link to the given non-empty URL string.
setRotation(angle) Image Sets the element's clockwise rotation angle around its center in degrees.
setTitle(title) Image Sets the page element's alt text title.
setTop(top) Image Sets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform) Image Sets the transform of the page element with the provided transform.
setWidth(width) Image Sets 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() PageBackground Gets the page's background.
getColorScheme() ColorScheme Gets 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() Master Gets the master that the layout is based on.
getObjectId() StringGets the unique ID for the page.
getPageElementById(id) PageElement|nullReturns 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() PageType Gets the type of the page.
getPlaceholder(placeholderType) PageElement|nullReturns the placeholder PageElement object for a specified PlaceholderType or null if a matching placeholder is not present.
getPlaceholder(placeholderType, placeholderIndex) PageElement|nullReturns 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) Group Groups all the specified page elements.
insertGroup(group) Group Inserts a copy of the provided Group on the page.
insertImage(blobSource) Image Inserts 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) Image Inserts an image on the page with the provided position and size from the specified image blob.
insertImage(image) Image Inserts a copy of the provided Image on the page.
insertImage(imageUrl) Image Inserts an image at the top left corner of the page with a default size from the provided URL.
insertImage(imageUrl, left, top, width, height) Image Inserts an image on the page with the provided position and size from the provided URL.
insertLine(line) Line Inserts a copy of the provided Line on the page.
insertLine(lineCategory, startConnectionSite, endConnectionSite) Line Inserts a line on the page connecting two connection sites .
insertLine(lineCategory, startLeft, startTop, endLeft, endTop) Line Inserts a line on the page.
insertPageElement(pageElement) PageElement Inserts a copy of the provided PageElement on the page.
insertShape(shape) Shape Inserts a copy of the provided Shape on the page.
insertShape(shapeType) Shape Inserts a shape on the page.
insertShape(shapeType, left, top, width, height) Shape Inserts a shape on the page.
insertSheetsChart(sourceChart) SheetsChart Inserts a Google Sheets chart on the page.
insertSheetsChart(sourceChart, left, top, width, height) SheetsChart Inserts a Google Sheets chart on the page with the provided position and size.
insertSheetsChart(sheetsChart) SheetsChart Inserts a copy of the provided SheetsChart on the page.
insertSheetsChartAsImage(sourceChart) Image Inserts a Google Sheets chart as an Image on the page.
insertSheetsChartAsImage(sourceChart, left, top, width, height) Image Inserts a Google Sheets chart as an Image on the page with the provided position and size.
insertTable(numRows, numColumns) Table Inserts a table on the page.
insertTable(numRows, numColumns, left, top, width, height) Table Inserts a table on the page with the provided position and size.
insertTable(table) Table Inserts a copy of the provided Table on the page.
insertTextBox(text) Shape Inserts a text box Shape containing the provided string on the page.
insertTextBox(text, left, top, width, height) Shape Inserts a text box Shape containing the provided string on the page.
insertVideo(videoUrl) Video Inserts a video at the top left corner of the page with a default size.
insertVideo(videoUrl, left, top, width, height) Video Inserts a video on the page with the provided position and size.
insertVideo(video) Video Inserts a copy of the provided Video on the page.
insertWordArt(wordArt) WordArt Inserts 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) Line Aligns the element to the specified alignment position on the page.
bringForward() Line Brings the page element forward on the page by one element.
bringToFront() Line Brings the page element to the front of the page.
duplicate() PageElement Duplicates 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() DashStyle Gets the DashStyle of the line.
getDescription() StringReturns the page element's alt text description.
getEnd() Point Returns the end point of the line, measured from the upper-left corner of the page.
getEndArrow() ArrowStyle Gets the ArrowStyle of the arrow at the end of the line.
getEndConnection() ConnectionSite|nullReturns the connection at the end of the line, or null if there is no connection.
getHeight() Number|nullGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight() Number|nullReturns the element's inherent height in points.
getInherentWidth() Number|nullReturns 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() LineCategory Gets the LineCategory of the line.
getLineFill() LineFill Gets the LineFill of the line.
getLineType() LineType Gets the LineType of the line.
getLink() Link|nullReturns the Link or null if there is no link.
getObjectId() StringReturns the unique ID for this object.
getPageElementType() PageElementType Returns the page element's type, represented as a PageElementType enum.
getParentGroup() Group|nullReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage() Page Returns 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() Point Returns the start point of the line, measured from the upper-left corner of the page.
getStartArrow() ArrowStyle Gets the ArrowStyle of the arrow at the beginning of the line.
getStartConnection() ConnectionSite|nullReturns 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() AffineTransform Returns the page element's transform.
getWeight() NumberReturns the thickness of the line in points.
getWidth() Number|nullReturns 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) Line Preconcatenates the provided transform to the existing transform of the page element.
remove() voidRemoves the page element.
removeLink() voidRemoves a Link .
reroute() Line Reroutes the start and end of the line to the closest two connection sites on the connected page elements.
scaleHeight(ratio) Line Scales the element's height by the specified ratio.
scaleWidth(ratio) Line Scales 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() Line Sends the page element backward on the page by one element.
sendToBack() Line Sends the page element to the back of the page.
setDashStyle(style) Line Sets the DashStyle of the line.
setDescription(description) Line Sets the page element's alt text description.
setEnd(left, top) Line Sets the position of the end point of the line.
setEnd(point) Line Sets the position of the end point of the line.
setEndArrow(style) Line Sets the ArrowStyle of the arrow at the end of the line.
setEndConnection(connectionSite) Line Sets the connection at the end of the line.
setHeight(height) Line Sets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left) Line Sets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setLineCategory(lineCategory) Line Sets the LineCategory of the line.
setLinkSlide(slideIndex) Link Sets a Link to the given Slide using the zero-based index of the slide.
setLinkSlide(slide) Link Sets a Link to the given Slide , the link is set by the given slide ID.
setLinkSlide(slidePosition) Link Sets a Link to the given Slide using the relative position of the slide.
setLinkUrl(url) Link Sets a Link to the given non-empty URL string.
setRotation(angle) Line Sets the element's clockwise rotation angle around its center in degrees.
setStart(left, top) Line Sets the position of the start point of the line.
setStart(point) Line Sets the position of the start point of the line.
setStartArrow(style) Line Sets the ArrowStyle of the arrow at the beginning of the line.
setStartConnection(connectionSite) Line Sets the connection at the beginning of the line.
setTitle(title) Line Sets the page element's alt text title.
setTop(top) Line Sets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform) Line Sets the transform of the page element with the provided transform.
setWeight(points) Line Sets the thickness of the line in points.
setWidth(width) Line Sets 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() LineFillType Gets the type of the line fill.
getSolidFill() SolidFill|nullGets 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() LinkType Returns the LinkType .
getLinkedSlide() Slide|nullReturns the linked Slide for non-URL links types, if it exists.
getSlideId() String|nullReturns the ID of the linked Slide or null if the LinkType is not LinkType.SLIDE_ID .
getSlideIndex() Integer|nullReturns the zero-based index of the linked Slide or null if the LinkType is not LinkType.SLIDE_INDEX .
getSlidePosition() SlidePosition|nullReturns the SlidePosition of the linked Slide or null if the LinkType is not LinkType.SLIDE_POSITION .
getUrl() String|nullReturns 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) ListStyle Applies the specified ListPreset to all of the paragraphs that overlap with the text.
getGlyph() String|nullReturns the rendered glyph for the text.
getList() List|nullReturns 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() Integer|nullReturns the 0-based nesting level of the text.
isInList() Boolean|nullReturns 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() ListStyle Removes the paragraphs that overlap with the text from any lists.

Master

Methods

MethodReturn typeBrief description
getBackground() PageBackground Gets the page's background.
getColorScheme() ColorScheme Gets 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) PageElement|nullReturns 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() PageType Gets the type of the page.
getPlaceholder(placeholderType) PageElement|nullReturns the placeholder PageElement object for a specified PlaceholderType or null if a matching placeholder is not present.
getPlaceholder(placeholderType, placeholderIndex) PageElement|nullReturns 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) Group Groups all the specified page elements.
insertGroup(group) Group Inserts a copy of the provided Group on the page.
insertImage(blobSource) Image Inserts 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) Image Inserts an image on the page with the provided position and size from the specified image blob.
insertImage(image) Image Inserts a copy of the provided Image on the page.
insertImage(imageUrl) Image Inserts an image at the top left corner of the page with a default size from the provided URL.
insertImage(imageUrl, left, top, width, height) Image Inserts an image on the page with the provided position and size from the provided URL.
insertLine(line) Line Inserts a copy of the provided Line on the page.
insertLine(lineCategory, startConnectionSite, endConnectionSite) Line Inserts a line on the page connecting two connection sites .
insertLine(lineCategory, startLeft, startTop, endLeft, endTop) Line Inserts a line on the page.
insertPageElement(pageElement) PageElement Inserts a copy of the provided PageElement on the page.
insertShape(shape) Shape Inserts a copy of the provided Shape on the page.
insertShape(shapeType) Shape Inserts a shape on the page.
insertShape(shapeType, left, top, width, height) Shape Inserts a shape on the page.
insertSheetsChart(sourceChart) SheetsChart Inserts a Google Sheets chart on the page.
insertSheetsChart(sourceChart, left, top, width, height) SheetsChart Inserts a Google Sheets chart on the page with the provided position and size.
insertSheetsChart(sheetsChart) SheetsChart Inserts a copy of the provided SheetsChart on the page.
insertSheetsChartAsImage(sourceChart) Image Inserts a Google Sheets chart as an Image on the page.
insertSheetsChartAsImage(sourceChart, left, top, width, height) Image Inserts a Google Sheets chart as an Image on the page with the provided position and size.
insertTable(numRows, numColumns) Table Inserts a table on the page.
insertTable(numRows, numColumns, left, top, width, height) Table Inserts a table on the page with the provided position and size.
insertTable(table) Table Inserts a copy of the provided Table on the page.
insertTextBox(text) Shape Inserts a text box Shape containing the provided string on the page.
insertTextBox(text, left, top, width, height) Shape Inserts a text box Shape containing the provided string on the page.
insertVideo(videoUrl) Video Inserts a video at the top left corner of the page with a default size.
insertVideo(videoUrl, left, top, width, height) Video Inserts a video on the page with the provided position and size.
insertVideo(video) Video Inserts a copy of the provided Video on the page.
insertWordArt(wordArt) WordArt Inserts 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) PageElement|nullReturns 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) PageElement|nullReturns the placeholder PageElement object for a specified PlaceholderType or null if a matching placeholder is not present.
getPlaceholder(placeholderType, placeholderIndex) PageElement|nullReturns 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) PageElement|nullReturns 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) PageElement|nullReturns the placeholder PageElement object for a specified PlaceholderType or null if a matching placeholder is not present.
getPlaceholder(placeholderType, placeholderIndex) PageElement|nullReturns 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() Shape Gets 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() Layout Returns the page as a layout.
asMaster() Master Returns the page as a master.
asSlide() Slide Returns the page as a slide.
getBackground() PageBackground Gets the page's background.
getColorScheme() ColorScheme Gets 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) PageElement|nullReturns 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() PageType Gets the type of the page.
getPlaceholder(placeholderType) PageElement|nullReturns the placeholder PageElement object for a specified PlaceholderType or null if a matching placeholder is not present.
getPlaceholder(placeholderType, placeholderIndex) PageElement|nullReturns 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) Group Groups all the specified page elements.
insertGroup(group) Group Inserts a copy of the provided Group on the page.
insertImage(blobSource) Image Inserts 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) Image Inserts an image on the page with the provided position and size from the specified image blob.
insertImage(image) Image Inserts a copy of the provided Image on the page.
insertImage(imageUrl) Image Inserts an image at the top left corner of the page with a default size from the provided URL.
insertImage(imageUrl, left, top, width, height) Image Inserts an image on the page with the provided position and size from the provided URL.
insertLine(line) Line Inserts a copy of the provided Line on the page.
insertLine(lineCategory, startConnectionSite, endConnectionSite) Line Inserts a line on the page connecting two connection sites .
insertLine(lineCategory, startLeft, startTop, endLeft, endTop) Line Inserts a line on the page.
insertPageElement(pageElement) PageElement Inserts a copy of the provided PageElement on the page.
insertShape(shape) Shape Inserts a copy of the provided Shape on the page.
insertShape(shapeType) Shape Inserts a shape on the page.
insertShape(shapeType, left, top, width, height) Shape Inserts a shape on the page.
insertSheetsChart(sourceChart) SheetsChart Inserts a Google Sheets chart on the page.
insertSheetsChart(sourceChart, left, top, width, height) SheetsChart Inserts a Google Sheets chart on the page with the provided position and size.
insertSheetsChart(sheetsChart) SheetsChart Inserts a copy of the provided SheetsChart on the page.
insertSheetsChartAsImage(sourceChart) Image Inserts a Google Sheets chart as an Image on the page.
insertSheetsChartAsImage(sourceChart, left, top, width, height) Image Inserts a Google Sheets chart as an Image on the page with the provided position and size.
insertTable(numRows, numColumns) Table Inserts a table on the page.
insertTable(numRows, numColumns, left, top, width, height) Table Inserts a table on the page with the provided position and size.
insertTable(table) Table Inserts a copy of the provided Table on the page.
insertTextBox(text) Shape Inserts a text box Shape containing the provided string on the page.
insertTextBox(text, left, top, width, height) Shape Inserts a text box Shape containing the provided string on the page.
insertVideo(videoUrl) Video Inserts a video at the top left corner of the page with a default size.
insertVideo(videoUrl, left, top, width, height) Video Inserts a video on the page with the provided position and size.
insertVideo(video) Video Inserts a copy of the provided Video on the page.
insertWordArt(wordArt) WordArt Inserts 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() PictureFill|nullGet the stretched picture fill of this background, or null if the background fill type is not PageBackgroundType.PICTURE .
getSolidFill() SolidFill|nullGet the solid fill of this background, or null if the background fill type is not PageBackgroundType.SOLID .
getType() PageBackgroundType Get 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) PageElement Aligns the element to the specified alignment position on the page.
asGroup() Group Returns the page element as a group.
asImage() Image Returns the page element as an image.
asLine() Line Returns the page element as a line.
asShape() Shape Returns the page element as a shape.
asSheetsChart() SheetsChart Returns the page element as a linked chart embedded from Google Sheets.
asSpeakerSpotlight() SpeakerSpotlight Returns the page element as a speaker spotlight.
asTable() Table Returns the page element as a table.
asVideo() Video Returns the page element as a video.
asWordArt() WordArt Returns the page element as word art.
bringForward() PageElement Brings the page element forward on the page by one element.
bringToFront() PageElement Brings the page element to the front of the page.
duplicate() PageElement Duplicates 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() Number|nullGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight() Number|nullReturns the element's inherent height in points.
getInherentWidth() Number|nullReturns 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() PageElementType Returns the page element's type, represented as a PageElementType enum.
getParentGroup() Group|nullReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage() Page Returns 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() AffineTransform Returns the page element's transform.
getWidth() Number|nullReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform) PageElement Preconcatenates the provided transform to the existing transform of the page element.
remove() voidRemoves the page element.
scaleHeight(ratio) PageElement Scales the element's height by the specified ratio.
scaleWidth(ratio) PageElement Scales 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() PageElement Sends the page element backward on the page by one element.
sendToBack() PageElement Sends the page element to the back of the page.
setDescription(description) PageElement Sets the page element's alt text description.
setHeight(height) PageElement Sets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left) PageElement Sets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setRotation(angle) PageElement Sets the element's clockwise rotation angle around its center in degrees.
setTitle(title) PageElement Sets the page element's alt text title.
setTop(top) PageElement Sets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform) PageElement Sets the transform of the page element with the provided transform.
setWidth(width) PageElement Sets 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() Integer|nullReturns the index of the paragraph's newline.
getRange() TextRange|nullReturns 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() Number|nullReturns the text end indentation for paragraphs in the TextRange in points, or null if there are multiple paragraph styles on the given text.
getIndentFirstLine() Number|nullReturns 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() Number|nullReturns the text start indentation for paragraphs in the TextRange in points, or null if there are multiple paragraph styles on the given text.
getLineSpacing() Number|nullReturns the line spacing, or null if there are multiple paragraph styles on the given text.
getParagraphAlignment() ParagraphAlignment|nullReturns the ParagraphAlignment of paragraphs in the TextRange , or null if there are multiple paragraph styles on the given text.
getSpaceAbove() Number|nullReturns the extra space above paragraphs in the TextRange in points, or null if there are multiple paragraph styles on the given text.
getSpaceBelow() Number|nullReturns the extra space below paragraphs in the TextRange in points, or null if there are multiple paragraph styles on the given text.
getSpacingMode() SpacingMode|nullReturns the SpacingMode for paragraphs in the TextRange , or null if there are multiple paragraph styles on the given text.
getTextDirection() TextDirection|nullReturns the TextDirection for paragraphs in the TextRange , or null if there are multiple paragraph styles on the given text.
setIndentEnd(indent) ParagraphStyle Sets the text end indentation for paragraphs in the TextRange in points.
setIndentFirstLine(indent) ParagraphStyle Sets the indentation for the first line of paragraphs in the TextRange in points.
setIndentStart(indent) ParagraphStyle Sets the text start indentation for paragraphs in the TextRange in points.
setLineSpacing(spacing) ParagraphStyle Sets the line spacing.
setParagraphAlignment(alignment) ParagraphStyle Sets the ParagraphAlignment of paragraphs in the TextRange .
setSpaceAbove(space) ParagraphStyle Sets the extra space above paragraphs in the TextRange in points.
setSpaceBelow(space) ParagraphStyle Sets the extra space below paragraphs in the TextRange in points.
setSpacingMode(mode) ParagraphStyle Sets the SpacingMode for paragraphs in the TextRange .
setTextDirection(direction) ParagraphStyle Sets the TextDirection for paragraphs in the TextRange .

PictureFill

Methods

MethodReturn typeBrief description
getAs(contentType) Blob Return the data inside this object as a blob converted to the specified content type.
getBlob() Blob Return the data inside this object as a converted blob.
getContentUrl() StringGets a URL to the image.
getSourceUrl() String|nullGets 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) Presentation Adds the given user to the list of editors for the Presentation .
addEditor(user) Presentation Adds the given user to the list of editors for the Presentation .
addEditors(emailAddresses) Presentation Adds the given array of users to the list of editors for the Presentation .
addViewer(emailAddress) Presentation Adds the given user to the list of viewers for the Presentation .
addViewer(user) Presentation Adds the given user to the list of viewers for the Presentation .
addViewers(emailAddresses) Presentation Adds the given array of users to the list of viewers for the Presentation .
appendSlide() Slide Appends a slide to the end of the presentation using the PredefinedLayout.BLANK predefined layout based on the current master.
appendSlide(layout) Slide Appends a slide to the end of the presentation using the specified layout based on the current master.
appendSlide(predefinedLayout) Slide Appends a slide to the end of the presentation using the specified predefined layout based on the current master.
appendSlide(slide) Slide Appends a copy of the provided Slide to the end of the presentation.
appendSlide(slide, linkingMode) Slide Appends 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() NotesMaster Gets 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) PageElement|nullReturns 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() Selection|nullGets the user’s selection in the active presentation.
getSlideById(id) Slide|nullReturns 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) Slide Inserts a slide at the specified index in the presentation using the PredefinedLayout.BLANK predefined layout based on the current master.
insertSlide(insertionIndex, layout) Slide Inserts a slide at the specified index in the presentation using the specified layout based on the current master.
insertSlide(insertionIndex, predefinedLayout) Slide Inserts a slide at the specified index in the presentation using the specified predefined layout based on the current master.
insertSlide(insertionIndex, slide) Slide Inserts a copy of the provided Slide at the specified index in the presentation.
insertSlide(insertionIndex, slide, linkingMode) Slide Inserts 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) Presentation Removes the given user from the list of editors for the Presentation .
removeEditor(user) Presentation Removes the given user from the list of editors for the Presentation .
removeViewer(emailAddress) Presentation Removes the given user from the list of viewers and commenters for the Presentation .
removeViewer(user) Presentation Removes 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() Page|nullReturns the currently active Page or null if there is no active page.
getPageElementRange() PageElementRange|nullReturns the PageElementRange collection of PageElement instances that are selected or null if there are no PageElement instances selected.
getPageRange() PageRange|nullReturns 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() SelectionType Returns the SelectionType .
getTableCellRange() TableCellRange|nullReturns the TableCellRange collection of TableCell instances that are selected or null if there are no TableCell instances selected.
getTextRange() TextRange|nullReturns 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) Shape Aligns the element to the specified alignment position on the page.
bringForward() Shape Brings the page element forward on the page by one element.
bringToFront() Shape Brings the page element to the front of the page.
duplicate() PageElement Duplicates the page element.
getAutofit() Autofit|nullReturns the Autofit of the text within this shape.
getBorder() Border Returns 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() ContentAlignment Returns the ContentAlignment of the text in the shape.
getDescription() StringReturns the page element's alt text description.
getFill() Fill Returns the Fill of the shape.
getHeight() Number|nullGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight() Number|nullReturns the element's inherent height in points.
getInherentWidth() Number|nullReturns 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() Link|nullReturns the Link or null if there is no link.
getObjectId() StringReturns the unique ID for this object.
getPageElementType() PageElementType Returns the page element's type, represented as a PageElementType enum.
getParentGroup() Group|nullReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage() Page Returns the page this page element is on.
getParentPlaceholder() PageElement|nullReturns the parent page element of the placeholder.
getPlaceholderIndex() Integer|nullReturns the placeholder index of the shape.
getPlaceholderType() PlaceholderType Returns 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() ShapeType Returns the type of the shape.
getText() TextRange Returns 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() AffineTransform Returns the page element's transform.
getWidth() Number|nullReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform) Shape Preconcatenates the provided transform to the existing transform of the page element.
remove() voidRemoves the page element.
removeLink() voidRemoves a Link .
replaceWithImage(blobSource) Image Replaces this shape with an image provided by a BlobSource .
replaceWithImage(blobSource, crop) Image Replaces this shape with an image provided by a BlobSource .
replaceWithImage(imageUrl) Image Replaces this shape with an image.
replaceWithImage(imageUrl, crop) Image Replaces this shape with an image.
replaceWithSheetsChart(sourceChart) SheetsChart Replaces this shape with a Google Sheets chart.
replaceWithSheetsChartAsImage(sourceChart) Image Replaces this shape with an image of a Google Sheets chart.
scaleHeight(ratio) Shape Scales the element's height by the specified ratio.
scaleWidth(ratio) Shape Scales 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() Shape Sends the page element backward on the page by one element.
sendToBack() Shape Sends the page element to the back of the page.
setContentAlignment(contentAlignment) Shape Sets the ContentAlignment of the text in the shape.
setDescription(description) Shape Sets the page element's alt text description.
setHeight(height) Shape Sets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left) Shape Sets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setLinkSlide(slideIndex) Link Sets a Link to the given Slide using the zero-based index of the slide.
setLinkSlide(slide) Link Sets a Link to the given Slide , the link is set by the given slide ID.
setLinkSlide(slidePosition) Link Sets a Link to the given Slide using the relative position of the slide.
setLinkUrl(url) Link Sets a Link to the given non-empty URL string.
setRotation(angle) Shape Sets the element's clockwise rotation angle around its center in degrees.
setTitle(title) Shape Sets the page element's alt text title.
setTop(top) Shape Sets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform) Shape Sets the transform of the page element with the provided transform.
setWidth(width) Shape Sets 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) SheetsChart Aligns the element to the specified alignment position on the page.
asImage() Image|nullReturns the chart as an image or null if the chart is not an embedded image.
bringForward() SheetsChart Brings the page element forward on the page by one element.
bringToFront() SheetsChart Brings the page element to the front of the page.
duplicate() PageElement Duplicates 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() SheetsChartEmbedType Returns the embed type of the Sheets chart.
getHeight() Number|nullGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight() Number|nullReturns the element's inherent height in points.
getInherentWidth() Number|nullReturns 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() Link|nullReturns the Link or null if there is no link.
getObjectId() StringReturns the unique ID for this object.
getPageElementType() PageElementType Returns the page element's type, represented as a PageElementType enum.
getParentGroup() Group|nullReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage() Page Returns 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() AffineTransform Returns the page element's transform.
getWidth() Number|nullReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform) SheetsChart Preconcatenates 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) SheetsChart Scales the element's height by the specified ratio.
scaleWidth(ratio) SheetsChart Scales 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() SheetsChart Sends the page element backward on the page by one element.
sendToBack() SheetsChart Sends the page element to the back of the page.
setDescription(description) SheetsChart Sets the page element's alt text description.
setHeight(height) SheetsChart Sets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left) SheetsChart Sets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setLinkSlide(slideIndex) Link Sets a Link to the given Slide using the zero-based index of the slide.
setLinkSlide(slide) Link Sets a Link to the given Slide , the link is set by the given slide ID.
setLinkSlide(slidePosition) Link Sets a Link to the given Slide using the relative position of the slide.
setLinkUrl(url) Link Sets a Link to the given non-empty URL string.
setRotation(angle) SheetsChart Sets the element's clockwise rotation angle around its center in degrees.
setTitle(title) SheetsChart Sets the page element's alt text title.
setTop(top) SheetsChart Sets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform) SheetsChart Sets the transform of the page element with the provided transform.
setWidth(width) SheetsChart Sets 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() Slide Duplicates the slide.
getBackground() PageBackground Gets the page's background.
getColorScheme() ColorScheme Gets 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() Layout|nullGets 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() NotesPage Returns the notes page associated with the slide.
getObjectId() StringGets the unique ID for the page.
getPageElementById(id) PageElement|nullReturns 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() PageType Gets the type of the page.
getPlaceholder(placeholderType) PageElement|nullReturns the placeholder PageElement object for a specified PlaceholderType or null if a matching placeholder is not present.
getPlaceholder(placeholderType, placeholderIndex) PageElement|nullReturns 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() SlideLinkingMode Returns 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) Group Groups all the specified page elements.
insertGroup(group) Group Inserts a copy of the provided Group on the page.
insertImage(blobSource) Image Inserts 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) Image Inserts an image on the page with the provided position and size from the specified image blob.
insertImage(image) Image Inserts a copy of the provided Image on the page.
insertImage(imageUrl) Image Inserts an image at the top left corner of the page with a default size from the provided URL.
insertImage(imageUrl, left, top, width, height) Image Inserts an image on the page with the provided position and size from the provided URL.
insertLine(line) Line Inserts a copy of the provided Line on the page.
insertLine(lineCategory, startConnectionSite, endConnectionSite) Line Inserts a line on the page connecting two connection sites .
insertLine(lineCategory, startLeft, startTop, endLeft, endTop) Line Inserts a line on the page.
insertPageElement(pageElement) PageElement Inserts a copy of the provided PageElement on the page.
insertShape(shape) Shape Inserts a copy of the provided Shape on the page.
insertShape(shapeType) Shape Inserts a shape on the page.
insertShape(shapeType, left, top, width, height) Shape Inserts a shape on the page.
insertSheetsChart(sourceChart) SheetsChart Inserts a Google Sheets chart on the page.
insertSheetsChart(sourceChart, left, top, width, height) SheetsChart Inserts a Google Sheets chart on the page with the provided position and size.
insertSheetsChart(sheetsChart) SheetsChart Inserts a copy of the provided SheetsChart on the page.
insertSheetsChartAsImage(sourceChart) Image Inserts a Google Sheets chart as an Image on the page.
insertSheetsChartAsImage(sourceChart, left, top, width, height) Image Inserts a Google Sheets chart as an Image on the page with the provided position and size.
insertTable(numRows, numColumns) Table Inserts a table on the page.
insertTable(numRows, numColumns, left, top, width, height) Table Inserts a table on the page with the provided position and size.
insertTable(table) Table Inserts a copy of the provided Table on the page.
insertTextBox(text) Shape Inserts a text box Shape containing the provided string on the page.
insertTextBox(text, left, top, width, height) Shape Inserts a text box Shape containing the provided string on the page.
insertVideo(videoUrl) Video Inserts a video at the top left corner of the page with a default size.
insertVideo(videoUrl, left, top, width, height) Video Inserts a video on the page with the provided position and size.
insertVideo(video) Video Inserts a copy of the provided Video on the page.
insertWordArt(wordArt) WordArt Inserts 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
AlignmentPositionAlignmentPosition An enumeration of the types of alignment positions.
ArrowStyleArrowStyle An enumeration of the different arrow styles that a Line can have.
AutoTextTypeAutoTextType An enumeration of the types of auto text.
AutofitTypeAutofitType An enumeration of autofit types.
CellMergeStateCellMergeState An enumeration of the different merge states of a table cell.
ColorTypeColorType An enumeration of color types.
ContentAlignmentContentAlignment An enumeration of values used to specify content alignment.
DashStyleDashStyle An enumeration of the different dash styles that a Line can have.
FillTypeFillType An enumeration of fill types.
LineCategoryLineCategory An enumeration of the categories of Line .
LineFillTypeLineFillType An enumeration of the types of LineFill .
LineTypeLineType An enumeration of the types of Line .
LinkTypeLinkType An enumeration of the types of links.
ListPresetListPreset An enumeration of the types of list presets.
PageBackgroundTypePageBackgroundType An enumeration of the types of page backgrounds.
PageElementTypePageElementType An enumeration of the types of page elements.
PageTypePageType An enumeration of the types of pages.
ParagraphAlignmentParagraphAlignment An enumeration of the types of paragraph alignment.
PlaceholderTypePlaceholderType An enumeration of the types of placeholders.
PredefinedLayoutPredefinedLayout An enumeration of the predefined layouts.
SelectionTypeSelectionType An enumeration of the types of selections.
ShapeTypeShapeType An enumeration of the types of shapes.
SheetsChartEmbedTypeSheetsChartEmbedType An enumeration of Sheets chart embed types.
SlideLinkingModeSlideLinkingMode An enumeration of the ways Slides can be linked.
SlidePositionSlidePosition An enumeration of the types of slide positions.
SpacingModeSpacingMode An enumeration of the types of spacing modes.
TextBaselineOffsetTextBaselineOffset An enumeration of the types of text baseline offset.
TextDirectionTextDirection An enumeration of the types of text directions.
ThemeColorTypeThemeColorType An enumeration of theme colors.
VideoSourceTypeVideoSourceType An enumeration of the types of video source.

Methods

MethodReturn typeBrief description
create(name) Presentation Creates and opens a new Presentation .
getActivePresentation() Presentation|nullReturns the currently active presentation to which the script is container-bound, or null if there is no active presentation.
getUi() Ui Returns an instance of the presentation's user-interface environment that allows the script to add features like menus, dialogs, and sidebars.
newAffineTransformBuilder() AffineTransformBuilder Returns a new AffineTransformBuilder to build an AffineTransform .
openById(id) Presentation Opens the Presentation with the given ID.
openByUrl(url) Presentation Opens 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() Color Get 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) SpeakerSpotlight Aligns the element to the specified alignment position on the page.
bringForward() SpeakerSpotlight Brings the page element forward on the page by one element.
bringToFront() SpeakerSpotlight Brings the page element to the front of the page.
duplicate() PageElement Duplicates the page element.
getBorder() Border Returns 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() Number|nullGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight() Number|nullReturns the element's inherent height in points.
getInherentWidth() Number|nullReturns 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() ShapeType|nullReturns 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() PageElementType Returns the page element's type, represented as a PageElementType enum.
getParentGroup() Group|nullReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage() Page Returns 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() AffineTransform Returns the page element's transform.
getWidth() Number|nullReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform) SpeakerSpotlight Preconcatenates the provided transform to the existing transform of the page element.
remove() voidRemoves the page element.
scaleHeight(ratio) SpeakerSpotlight Scales the element's height by the specified ratio.
scaleWidth(ratio) SpeakerSpotlight Scales 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() SpeakerSpotlight Sends the page element backward on the page by one element.
sendToBack() SpeakerSpotlight Sends the page element to the back of the page.
setDescription(description) SpeakerSpotlight Sets the page element's alt text description.
setHeight(height) SpeakerSpotlight Sets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left) SpeakerSpotlight Sets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setRotation(angle) SpeakerSpotlight Sets the element's clockwise rotation angle around its center in degrees.
setTitle(title) SpeakerSpotlight Sets the page element's alt text title.
setTop(top) SpeakerSpotlight Sets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform) SpeakerSpotlight Sets the transform of the page element with the provided transform.
setWidth(width) SpeakerSpotlight Sets 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) Table Aligns the element to the specified alignment position on the page.
appendColumn() TableColumn Appends a new column to the right of the last column of the table.
appendRow() TableRow Appends a new row below the last row of the table.
bringForward() Table Brings the page element forward on the page by one element.
bringToFront() Table Brings the page element to the front of the page.
duplicate() PageElement Duplicates the page element.
getCell(rowIndex, columnIndex) TableCell Returns the specified cell in the table.
getColumn(columnIndex) TableColumn Returns 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() Number|nullGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight() Number|nullReturns the element's inherent height in points.
getInherentWidth() Number|nullReturns 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() PageElementType Returns the page element's type, represented as a PageElementType enum.
getParentGroup() Group|nullReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage() Page Returns 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) TableRow Returns 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() AffineTransform Returns the page element's transform.
getWidth() Number|nullReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
insertColumn(index) TableColumn Inserts a new column at the specified index of the table.
insertRow(index) TableRow Inserts a new row at the specified index of the table.
preconcatenateTransform(transform) Table Preconcatenates the provided transform to the existing transform of the page element.
remove() voidRemoves the page element.
scaleHeight(ratio) Table Scales the element's height by the specified ratio.
scaleWidth(ratio) Table Scales 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() Table Sends the page element backward on the page by one element.
sendToBack() Table Sends the page element to the back of the page.
setDescription(description) Table Sets the page element's alt text description.
setHeight(height) Table Sets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left) Table Sets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setRotation(angle) Table Sets the element's clockwise rotation angle around its center in degrees.
setTitle(title) Table Sets the page element's alt text title.
setTop(top) Table Sets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform) Table Sets the transform of the page element with the provided transform.
setWidth(width) Table Sets 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() ContentAlignment Returns the ContentAlignment of the text in the table cell.
getFill() Fill Returns the fill of the table cell.
getHeadCell() TableCell|nullReturns the head cell of this table cell.
getMergeState() CellMergeState Returns the merge state of the table cell.
getParentColumn() TableColumn Returns the table column containing the current cell.
getParentRow() TableRow Returns the table row containing the current cell.
getParentTable() Table Returns 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() TextRange Returns the text content of the table cell.
setContentAlignment(contentAlignment) TableCell Sets 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) TableCell Returns 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() Table Returns 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) TableCell Returns 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() Table Returns the table containing the current row.
remove() voidRemoves the table row.

TextBaselineOffset

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA 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) Paragraph Appends a paragraph at the end of the text range.
appendRange(textRange) TextRange Appends a copy of the provided text range to the end of the current text range.
appendRange(textRange, matchSourceFormatting) TextRange Appends a copy of the provided text range to the end of the current text range.
appendText(text) TextRange Appends 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 Link s 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() ListStyle Returns the ListStyle of the current text range.
getParagraphStyle() ParagraphStyle Returns the ParagraphStyle of the current text range.
getParagraphs() Paragraph[] Returns the paragraphs that overlap the current text range.
getRange(startOffset, endOffset) TextRange Returns 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() TextStyle|nullReturns the text style of the range, or null if the range is empty.
insertParagraph(startOffset, text) Paragraph Inserts a paragraph at the start offset.
insertRange(startOffset, textRange) TextRange Inserts a copy of the provided text range at the start offset.
insertRange(startOffset, textRange, matchSourceFormatting) TextRange Inserts a copy of the provided text range at the start offset.
insertText(startOffset, text) TextRange Inserts 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) TextRange Sets the text bounded by this range of the associated shape or table cell.

TextStyle

Methods

MethodReturn typeBrief description
getBackgroundColor() Color|nullReturns the background color of the text, or null if there are multiple styles on the text.
getBaselineOffset() TextBaselineOffset|nullReturns the vertical offset of text from its normal position, or null if there are multiple styles on the text.
getFontFamily() String|nullReturns the font family of the text, or null if there are multiple styles on the text.
getFontSize() Number|nullReturns the font size of the text in points, or null if there are multiple styles on the text.
getFontWeight() Integer|nullReturns the font weight of the text, or null if there are multiple styles on the text.
getForegroundColor() Color|nullReturns the foreground color of the text, or null if there are multiple styles on the text.
getLink() Link|nullReturns the Link on the text, or null if there is no link or if the link is on part of the text or if there are multiple links.
hasLink() Boolean|nullReturns true if there is link on the text, false if not, or null if the link is on part of the text or there are multiple links.
isBackgroundTransparent() Boolean|nullReturns true if the background of the text is transparent, false if not, or null if there are multiple styles on the text.
isBold() Boolean|nullReturns true if the text is rendered as bold, false if not, or null if there are multiple styles on the text.
isItalic() Boolean|nullReturns true if the text is italicized, false if not, or null if there are multiple styles on the text.
isSmallCaps() Boolean|nullReturns true if the text is in small capital letters, false if not, or null if there are multiple styles on the text.
isStrikethrough() Boolean|nullReturns true if the text is struck through, false if not, or null if there are multiple styles on the text.
isUnderline() Boolean|nullReturns true if the text is underlined, false if not, or null if there are multiple styles on the text.
removeLink() TextStyle Removes a Link .
setBackgroundColor(color) TextStyle Sets the background color of the text.
setBackgroundColor(red, green, blue) TextStyle Sets the background color of the text to the given RGB values from 0 to 255.
setBackgroundColor(hexColor) TextStyle Sets the background color of the text to the given hex color string.
setBackgroundColor(color) TextStyle Sets the background color of the text to the given ThemeColorType .
setBackgroundColorTransparent() TextStyle Sets the background color of the text to transparent.
setBaselineOffset(offset) TextStyle Sets the vertical offset of the text relative to its normal position.
setBold(bold) TextStyle Sets whether the text should be rendered as bold.
setFontFamily(fontFamily) TextStyle Sets the font family of the text .
setFontFamilyAndWeight(fontFamily, fontWeight) TextStyle Sets the font family and weight of the text.
setFontSize(fontSize) TextStyle Sets the font size of the text, in points.
setForegroundColor(foregroundColor) TextStyle Sets the foreground color of the text.
setForegroundColor(red, green, blue) TextStyle Sets the foreground color of the text to the given RGB values from 0 to 255.
setForegroundColor(hexColor) TextStyle Sets the foreground color of the text to the given hex color string.
setForegroundColor(color) TextStyle Sets the foreground color of the text to the given ThemeColorType .
setItalic(italic) TextStyle Sets the whether the text is italicized.
setLinkSlide(slideIndex) TextStyle Sets a Link to the given Slide using the zero-based index of the slide.
setLinkSlide(slide) TextStyle Sets a Link to the given Slide , the link is set by the given slide ID.
setLinkSlide(slidePosition) TextStyle Sets a Link to the given Slide using the relative position of the slide.
setLinkUrl(url) TextStyle Sets a Link to the given non-empty URL string.
setSmallCaps(smallCaps) TextStyle Sets whether the text is rendered in small capital letters.
setStrikethrough(strikethrough) TextStyle Sets whether the text is struck through.
setUnderline(underline) TextStyle Sets whether the text is underlined.

ThemeColor

Methods

MethodReturn typeBrief description
getColorType() ColorType Get the type of this color.
getThemeColorType() ThemeColorType Get the theme color type of this color.

ThemeColorType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumRepresents a theme color that is not supported.
DARK1EnumRepresents the first dark color.
LIGHT1EnumRepresents the first light color.
DARK2EnumRepresents the second dark color.
LIGHT2EnumRepresents the second light color.
ACCENT1EnumRepresents the first accent color.
ACCENT2EnumRepresents the second accent color.
ACCENT3EnumRepresents the third accent color.
ACCENT4EnumRepresents the fourth accent color.
ACCENT5EnumRepresents the fifth accent color.
ACCENT6EnumRepresents the sixth accent color.
HYPERLINKEnumRepresents the color to use for hyperlinks.
FOLLOWED_HYPERLINKEnumRepresents the color to use for visited hyperlinks.

Video

Methods

MethodReturn typeBrief description
alignOnPage(alignmentPosition) Video Aligns the element to the specified alignment position on the page.
bringForward() Video Brings the page element forward on the page by one element.
bringToFront() Video Brings the page element to the front of the page.
duplicate() PageElement Duplicates the page element.
getBorder() Border Returns the Border of the video.
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() Number|nullGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight() Number|nullReturns the element's inherent height in points.
getInherentWidth() Number|nullReturns 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() PageElementType Returns the page element's type, represented as a PageElementType enum.
getParentGroup() Group|nullReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage() Page Returns 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.
getSource() VideoSourceType Gets the video source.
getThumbnailUrl() StringGets an URL to the video thumbnail.
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() AffineTransform Returns the page element's transform.
getUrl() String|nullGets an URL to the video.
getVideoId() StringGets the video source's unique identifier for this video.
getWidth() Number|nullReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform) Video Preconcatenates the provided transform to the existing transform of the page element.
remove() voidRemoves the page element.
scaleHeight(ratio) Video Scales the element's height by the specified ratio.
scaleWidth(ratio) Video Scales 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() Video Sends the page element backward on the page by one element.
sendToBack() Video Sends the page element to the back of the page.
setDescription(description) Video Sets the page element's alt text description.
setHeight(height) Video Sets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left) Video Sets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setRotation(angle) Video Sets the element's clockwise rotation angle around its center in degrees.
setTitle(title) Video Sets the page element's alt text title.
setTop(top) Video Sets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform) Video Sets the transform of the page element with the provided transform.
setWidth(width) Video Sets the element's width in points, which is the width of the element's bounding box when the element has no rotation.

VideoSourceType

Properties

PropertyTypeDescription
UNSUPPORTEDEnumA video source type that is not supported.
YOUTUBEEnumYouTube video.

WordArt

Methods

MethodReturn typeBrief description
alignOnPage(alignmentPosition) WordArt Aligns the element to the specified alignment position on the page.
bringForward() WordArt Brings the page element forward on the page by one element.
bringToFront() WordArt Brings the page element to the front of the page.
duplicate() PageElement Duplicates 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() Number|nullGets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
getInherentHeight() Number|nullReturns the element's inherent height in points.
getInherentWidth() Number|nullReturns 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() Link|nullReturns the Link or null if there is no link.
getObjectId() StringReturns the unique ID for this object.
getPageElementType() PageElementType Returns the page element's type, represented as a PageElementType enum.
getParentGroup() Group|nullReturns the group this page element belongs to, or null if the element is not in a group.
getParentPage() Page Returns the page this page element is on.
getRenderedText() StringGets the text that is rendered as word art.
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() AffineTransform Returns the page element's transform.
getWidth() Number|nullReturns the element's width in points, which is the width of the element's bounding box when the element has no rotation.
preconcatenateTransform(transform) WordArt Preconcatenates the provided transform to the existing transform of the page element.
remove() voidRemoves the page element.
removeLink() voidRemoves a Link .
scaleHeight(ratio) WordArt Scales the element's height by the specified ratio.
scaleWidth(ratio) WordArt Scales 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() WordArt Sends the page element backward on the page by one element.
sendToBack() WordArt Sends the page element to the back of the page.
setDescription(description) WordArt Sets the page element's alt text description.
setHeight(height) WordArt Sets the element's height in points, which is the height of the element's bounding box when the element has no rotation.
setLeft(left) WordArt Sets the element's horizontal position in points, measured from the upper-left corner of the page when the element has no rotation.
setLinkSlide(slideIndex) Link Sets a Link to the given Slide using the zero-based index of the slide.
setLinkSlide(slide) Link Sets a Link to the given Slide , the link is set by the given slide ID.
setLinkSlide(slidePosition) Link Sets a Link to the given Slide using the relative position of the slide.
setLinkUrl(url) Link Sets a Link to the given non-empty URL string.
setRotation(angle) WordArt Sets the element's clockwise rotation angle around its center in degrees.
setTitle(title) WordArt Sets the page element's alt text title.
setTop(top) WordArt Sets the element's vertical position in points, measured from the upper-left corner of the page when the element has no rotation.
setTransform(transform) WordArt Sets the transform of the page element with the provided transform.
setWidth(width) WordArt Sets the element's width in points, which is the width of the element's bounding box when the element has no rotation.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026年04月13日 UTC.