Document
This service allows scripts to create, access, and modify Google Docs files.
//
Open
a
document
by
ID
.
var
doc
=
DocumentApp
.
openById
(
'DOCUMENT_ID'
);
//
Create
and
open
a
document
.
doc
=
DocumentApp
.
create
(
'Document Name'
);
Classes
Name | Brief description |
---|---|
Attribute
|
An enumeration of the element attributes. |
Body
|
The content of a tab in a Google Docs document. |
Bookmark
|
An object representing a bookmark. |
Container
|
A generic element that may contain other elements. |
Date
|
An element representing a formatted date |
Document
|
A document, containing one or more Tab
objects, each of which contains rich text and
elements such as tables and lists. |
Document
|
The document service creates and opens Documents
that can be edited. |
Document
|
A document tab, containing rich text and elements such as tables and lists. |
Element
|
A generic element. |
Element
|
An enumeration of all the element types. |
Equation
|
An element representing a mathematical expression. |
Equation
|
An element representing a function in a mathematical Equation
. |
Equation
|
An element representing a function separator in a mathematical Equation
. |
Equation
|
An element representing a symbol in a mathematical Equation
. |
|
An enumeration of the supported fonts. |
Footer
|
An element representing a footer section. |
Footnote
|
An element representing a footnote. |
Footnote
|
An element representing a footnote section. |
Glyph
|
An enumeration of the supported glyph types. |
Header
|
An element representing a header section. |
Horizontal
|
An enumeration of the supported horizontal alignment types. |
Horizontal
|
An element representing an horizontal rule. |
Inline
|
An element representing an embedded drawing. |
Inline
|
An element representing an embedded image. |
List
|
An element representing a list item. |
Named
|
A Range
that has a name and ID to allow later retrieval. |
Page
|
An element representing a page break. |
Paragraph
|
An element representing a paragraph. |
Paragraph
|
An enumeration of the standard paragraph headings. |
Person
|
An element representing a link to a person. |
Position
|
A reference to a location in the document tab, relative to a specific element. |
Positioned
|
Fixed position image anchored to a Paragraph
. |
Positioned
|
An enumeration that specifies how to lay out a Positioned
in relation to surrounding
text. |
Range
|
A range of elements in a document. |
Range
|
A builder used to construct Range
objects from document elements. |
Range
|
A wrapper around an Element
with a possible start and end offset. |
Rich
|
An element representing a link to a Google resource, such as a Drive file or a YouTube video. |
Tab
|
A tab within a Google Docs document. |
Tab
|
An enumeration of all the tab types. |
Table
|
An element representing a table. |
Table
|
An element representing a table cell. |
Table
|
An element containing a table of contents. |
Table
|
An element representing a table row. |
Text
|
An element representing a rich text region. |
Text
|
An enumeration of the type of text alignments. |
Unsupported
|
An element representing a region that is unknown or cannot be affected by a script, such as a page number. |
Vertical
|
An enumeration of the supported vertical alignment types. |
Attribute
Properties
Property | Type | Description |
---|---|---|
BACKGROUND_COLOR
|
Enum
|
The background color of an element (Paragraph, Table, etc) or document. |
BOLD
|
Enum
|
The font weight setting, for rich text. |
BORDER_COLOR
|
Enum
|
The border color, for table elements. |
BORDER_WIDTH
|
Enum
|
The border width in points, for table elements. |
CODE
|
Enum
|
The code contents, for equation elements. |
FONT_FAMILY
|
Enum
|
The font family setting, for rich text. |
FONT_SIZE
|
Enum
|
The font size setting in points, for rich text. |
FOREGROUND_COLOR
|
Enum
|
The foreground color setting, for rich text. |
HEADING
|
Enum
|
The heading type, for paragraph elements (for example, Document
). |
HEIGHT
|
Enum
|
The height setting, for image elements. |
HORIZONTAL_ALIGNMENT
|
Enum
|
The horizontal alignment, for paragraph elements (for example, Document
). |
INDENT_END
|
Enum
|
The end indentation setting in points, for paragraph elements. |
INDENT_FIRST_LINE
|
Enum
|
The first line indentation setting in points, for paragraph elements. |
INDENT_START
|
Enum
|
The start indentation setting in points, for paragraph elements. |
ITALIC
|
Enum
|
The font style setting, for rich text. |
GLYPH_TYPE
|
Enum
|
The glyph type, for list item elements. |
LEFT_TO_RIGHT
|
Enum
|
The text direction setting, for rich text. |
LINE_SPACING
|
Enum
|
The line spacing setting as a multiplier, for paragraph elements. |
LINK_URL
|
Enum
|
The link URL, for rich text. |
LIST_ID
|
Enum
|
The ID of the encompassing list, for list item elements. |
MARGIN_BOTTOM
|
Enum
|
The bottom margin setting in points, for paragraph elements. |
MARGIN_LEFT
|
Enum
|
The left margin setting in points, for paragraph elements. |
MARGIN_RIGHT
|
Enum
|
The right margin setting in points, for paragraph elements. |
MARGIN_TOP
|
Enum
|
The top margin setting in points, for paragraph elements. |
NESTING_LEVEL
|
Enum
|
The item nesting level, for list item elements. |
MINIMUM_HEIGHT
|
Enum
|
The minimum height setting in points, for table row elements. |
PADDING_BOTTOM
|
Enum
|
The bottom padding setting in points, for table cell elements. |
PADDING_LEFT
|
Enum
|
The left padding setting in points, for table cell elements. |
PADDING_RIGHT
|
Enum
|
The right padding setting in points, for table cell elements. |
PADDING_TOP
|
Enum
|
The top padding setting in points, for table cell elements. |
PAGE_HEIGHT
|
Enum
|
The page height setting in points, for documents. |
PAGE_WIDTH
|
Enum
|
The page width setting in points, for documents. |
SPACING_AFTER
|
Enum
|
The bottom spacing setting in points, for paragraph elements. |
SPACING_BEFORE
|
Enum
|
The top spacing setting in points, for paragraph elements. |
STRIKETHROUGH
|
Enum
|
The strike-through setting, for rich text. |
UNDERLINE
|
Enum
|
The underline setting, for rich text. |
VERTICAL_ALIGNMENT
|
Enum
|
The vertical alignment setting, for table cell elements. |
WIDTH
|
Enum
|
The width setting, for table cell and image elements. |
Body
Methods
Method | Return type | Brief description |
---|---|---|
Horizontal
|
Creates and appends a new Horizontal
. |
|
Inline
|
Creates and appends a new Inline
from the specified image blob. |
|
Inline
|
Appends the given Inline
. |
|
List
|
Appends the given List
. |
|
List
|
Creates and appends a new List
containing the specified text contents. |
|
Page
|
Creates and appends a new Page
. |
|
Page
|
Appends the given Page
. |
|
Paragraph
|
Appends the given Paragraph
. |
|
Paragraph
|
Creates and appends a new Paragraph
containing the specified text contents. |
|
Table
|
Creates and appends a new Table
. |
|
Table
|
Appends a new Table
containing a Table
for each specified string value. |
|
Table
|
Appends the given Table
. |
|
Body
|
Clears the contents of the element. | |
Body
|
Returns a detached, deep copy of the current element. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for a descendant of the specified type. | |
Range
|
Searches the contents of the element for a descendant of the specified type, starting from the
specified Range
. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the child element at the specified child index. | |
Integer
|
Retrieves the child index for the specified child element. | |
Object
|
Retrieves the set of attributes for the provided Paragraph
. |
|
Inline
|
Retrieves all the Inline
contained in the section. |
|
List
|
Retrieves all the List
contained in the section. |
|
Number
|
Retrieves the bottom margin, in points. | |
Number
|
Retrieves the left margin, in points. | |
Number
|
Retrieves the right margin. | |
Number
|
Retrieves the top margin. | |
Integer
|
Retrieves the number of children. | |
Number
|
Retrieves the page height, in points. | |
Number
|
Retrieves the page width, in points. | |
Paragraph[]
|
Retrieves all the Paragraphs
contained in the section (including List
). |
|
Container
|
Retrieves the element's parent element. | |
Table[]
|
Retrieves all the Tables
contained in the section. |
|
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Element
|
Retrieves the element's Element
. |
|
Horizontal
|
Creates and inserts a new Horizontal
at the specified index. |
|
Inline
|
Creates and inserts an Inline
from the specified image blob, at the specified
index. |
|
Inline
|
Inserts the given Inline
at the specified index. |
|
List
|
Inserts the given List
at the specified index. |
|
List
|
Creates and inserts a new List
at the specified index, containing the specified
text contents. |
|
Page
|
Creates and inserts a new Page
at the specified index. |
|
Page
|
Inserts the given Page
at the specified index. |
|
Paragraph
|
Inserts the given Paragraph
at the specified index. |
|
Paragraph
|
Creates and inserts a new Paragraph
at the specified index, containing the specified
text contents. |
|
Table
|
Creates and inserts a new Table
at the specified index. |
|
Table
|
Creates and inserts a new Table
containing the specified cells, at the specified index. |
|
Table
|
Inserts the given Table
at the specified index. |
|
Body
|
Removes the specified child element. | |
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
Body
|
Sets the element's attributes. | |
Body
|
Sets the attributes for the provided Paragraph
. |
|
Body
|
Sets the bottom margin, in points. | |
Body
|
Sets the left margin, in points. | |
Body
|
Sets the right margin, in points. | |
Body
|
Sets the top margin. | |
Body
|
Sets the page height, in points. | |
Body
|
Sets the page width, in points. | |
Body
|
Sets the contents as plain text. | |
Body
|
Sets the text alignment. |
Bookmark
Methods
Method | Return type | Brief description |
---|---|---|
String
|
Gets the ID of the Bookmark
. |
|
Position
|
Gets the Position
of the Bookmark
within the Document
. |
|
void
|
Deletes the Bookmark
. |
Container
Element
Methods
Method | Return type | Brief description |
---|---|---|
Body
|
Returns the current element as a Body
. |
|
Equation
|
Returns the current element as an Equation
. |
|
Footer
|
Returns the current element as a Footer
. |
|
Footnote
|
Returns the current element as a Footnote
. |
|
Header
|
Returns the current element as a Header
. |
|
List
|
Returns the current element as a List
. |
|
Paragraph
|
Returns the current element as a Paragraph
. |
|
Table
|
Returns the current element as a Table
. |
|
Table
|
Returns the current element as a Table
. |
|
Table
|
Returns the current element as a Table
. |
|
Table
|
Returns the current element as a Table
. |
|
Container
|
Clears the contents of the element. | |
Container
|
Returns a detached, deep copy of the current element. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for a descendant of the specified type. | |
Range
|
Searches the contents of the element for a descendant of the specified type, starting from the
specified Range
. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the child element at the specified child index. | |
Integer
|
Retrieves the child index for the specified child element. | |
String
|
Retrieves the link url. | |
Element
|
Retrieves the element's next sibling element. | |
Integer
|
Retrieves the number of children. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Container
|
Merges the element with the preceding sibling of the same type. | |
Container
|
Removes the element from its parent. | |
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
Container
|
Sets the element's attributes. | |
Container
|
Sets the link url. | |
Container
|
Sets the text alignment. |
Date
Methods
Method | Return type | Brief description |
---|---|---|
Date
|
Returns a detached, deep copy of the current element. | |
Object
|
Retrieves the element's attributes. | |
String
|
Returns the display value that's rendered in the document. | |
String
|
Returns the date's locale used for the display value. | |
Element
|
Retrieves the element's next sibling element. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
Date
|
Returns the timestamp associated with the date. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Date
|
Merges the element with the preceding sibling of the same type. | |
Date
|
Removes the element from its parent. | |
Date
|
Sets the element's attributes. |
Document
Methods
Method | Return type | Brief description |
---|---|---|
Bookmark
|
Adds a Bookmark
at the given Position
to the first tab or, for scripts that are bound
to a document, the active tab. |
|
Document
|
Adds the given user to the list of editors for the Document
. |
|
Document
|
Adds the given user to the list of editors for the Document
. |
|
Document
|
Adds the given array of users to the list of editors for the Document
. |
|
Footer
|
Adds a footer section, if none exists, to the first tab or, for scripts that are bound to a document, the active tab. | |
Header
|
Adds a header section, if none exists, to the first tab or, for scripts that are bound to a document, the active tab. | |
Named
|
Adds a Named
, which is a Range
that has a name and ID to use for
later retrieval, in the first tab or, for scripts that are bound
to a document, the active tab. |
|
Document
|
Adds the given user to the list of viewers for the Document
. |
|
Document
|
Adds the given user to the list of viewers for the Document
. |
|
Document
|
Adds the given array of users to the list of viewers for the Document
. |
|
Tab
|
Gets the user's currently active Tab
in the document. |
|
Blob
|
Retrieves the current Document
contents as a blob of the specified type. |
|
Blob
|
Retrieves the current Document
contents as a blob. |
|
Body
|
Retrieves the first tab's Body
or, for scripts that are bound
to a document, the active tab's Document
. |
|
Bookmark
|
Gets the Bookmark
with the given ID in the first tab or, for scripts that are bound
to a document, the active tab. |
|
Bookmark[]
|
Gets all Bookmark
objects in the first tab or, for scripts that are bound
to a document, the active tab. |
|
Position
|
Gets the user's cursor in the active tab. | |
User[]
|
Gets the list of editors for this Document
. |
|
Footer
|
Retrieves the first tab's footer section or, for scripts that are bound to a document, the active tab's footer section. | |
Footnote[]
|
Retrieves all the Footnote
elements in the first tab's body or, for scripts that are bound
to a document, the active tab's body. |
|
Header
|
Retrieves the first tab's header section or, for scripts that are bound to a document, the active tab's header section. | |
String
|
Retrieves the document's unique identifier. | |
String
|
Gets the document's language code. | |
String
|
Retrieves the title of the document. | |
Named
|
Gets the Named
with the given ID in the first tab or, for scripts that are bound
to a document, the active tab. |
|
Named
|
Gets all Named
objects in the first tab or, for scripts that are bound
to a document, the active tab. |
|
Named
|
Gets all Named
objects with the given name in the first tab or, for scripts that
are bound
to a document, the active tab. |
|
Range
|
Gets the user's selection in the active tab. | |
String[]
|
Gets all language codes that are supported in Google Docs files. | |
Tab
|
Gets the Tab
with the specified ID. |
|
Tab[]
|
Gets all unnested Tab
s that are part of the document. |
|
String
|
Retrieves the URL to access the current document. | |
User[]
|
Gets the list of viewers and commenters for this Document
. |
|
Position
|
Creates a new Position
, which is a reference to a location in the tab, relative to a
specific element in the first tab or, for scripts that are bound
to a document, the active tab. |
|
Range
|
Creates a builder used to construct Range
objects from tab elements in the
first tab or, for scripts that are bound
to a
document, the active tab. |
|
Document
|
Removes the given user from the list of editors for the Document
. |
|
Document
|
Removes the given user from the list of editors for the Document
. |
|
Document
|
Removes the given user from the list of viewers and commenters for the Document
. |
|
Document
|
Removes the given user from the list of viewers and commenters for the Document
. |
|
void
|
Saves the current Document
. |
|
void
|
Sets the user's selected Tab
in the current document to the tab with the specified ID. |
|
Document
|
Sets the user's cursor, given a Position
. |
|
Document
|
Sets the document's language code. | |
Document
|
Sets the document title. | |
Document
|
Sets the user's selection in the active tab, given a Range
. |
Document
App
Properties
Property | Type | Description |
---|---|---|
Attribute
|
Attribute
|
The Attribute
enumeration. |
Element
|
Element
|
The Element
enumeration. |
Font
|
|
The
|
Glyph
|
Glyph
|
The Glyph
enumeration. |
Horizontal
|
Horizontal
|
The Horizontal
enumeration. |
Paragraph
|
Paragraph
|
The Paragraph
enumeration. |
Positioned
|
Positioned
|
The Positioned
enumeration. |
Text
|
Text
|
The Text
enumeration. |
Vertical
|
Vertical
|
The Vertical
enumeration. |
Methods
Method | Return type | Brief description |
---|---|---|
Document
|
Creates and returns a new document. | |
Document
|
Returns the document to which the script is container-bound . | |
Ui
|
Returns an instance of the document's user-interface environment that allows the script to add features like menus, dialogs, and sidebars. | |
Document
|
Returns the document with the specified ID. | |
Document
|
Opens and returns the document with the specified URL. |
Document
Tab
Methods
Method | Return type | Brief description |
---|---|---|
Bookmark
|
Adds a Bookmark
at the given Position
. |
|
Footer
|
Adds a tab footer section, if none exists. | |
Header
|
Adds a tab header section, if none exists. | |
Named
|
Adds a Named
, which is a Range
that has a name and ID to use for
later retrieval. |
|
Body
|
Retrieves the tab's Body
. |
|
Bookmark
|
Gets the Bookmark
with the given ID. |
|
Bookmark[]
|
Gets all Bookmark
objects in the tab. |
|
Footer
|
Retrieves the tab's footer section, if one exists. | |
Footnote[]
|
Retrieves all the Footnote
elements in the tab's body. |
|
Header
|
Retrieves the tab's header section, if one exists. | |
Named
|
Gets the Named
with the given ID. |
|
Named
|
Gets all Named
objects in the tab. |
|
Named
|
Gets all Named
objects in the tab with the given name. |
|
Position
|
Creates a new Position
, which is a reference to a location in the tab, relative to a
specific element. |
|
Range
|
Creates a builder used to construct Range
objects from tab elements. |
Element
Methods
Method | Return type | Brief description |
---|---|---|
Body
|
Returns the current element as a Body
. |
|
Date
|
Returns the current element as a Date
. |
|
Equation
|
Returns the current element as an Equation
. |
|
Equation
|
Returns the current element as a Equation
. |
|
Equation
|
Returns the current element as a Equation
. |
|
Equation
|
Returns the current element as a Equation
. |
|
Footer
|
Returns the current element as a Footer
. |
|
Footnote
|
Returns the current element as a Footnote
. |
|
Footnote
|
Returns the current element as a Footnote
. |
|
Header
|
Returns the current element as a Header
. |
|
Horizontal
|
Returns the current element as a Horizontal
. |
|
Inline
|
Returns the current element as a Inline
. |
|
Inline
|
Returns the current element as a Inline
. |
|
List
|
Returns the current element as a List
. |
|
Page
|
Returns the current element as a Page
. |
|
Paragraph
|
Returns the current element as a Paragraph
. |
|
Person
|
Returns the current element as a Person
. |
|
Rich
|
Returns the current element as a Rich
, for example, a link to a Google Sheets file. |
|
Table
|
Returns the current element as a Table
. |
|
Table
|
Returns the current element as a Table
. |
|
Table
|
Returns the current element as a Table
. |
|
Table
|
Returns the current element as a Table
. |
|
Text
|
Returns the current element as a Text
. |
|
Element
|
Returns a detached, deep copy of the current element. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the element's next sibling element. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Element
|
Merges the element with the preceding sibling of the same type. | |
Element
|
Removes the element from its parent. | |
Element
|
Sets the element's attributes. |
Element
Type
Properties
Property | Type | Description |
---|---|---|
BODY_SECTION
|
Enum
|
The type corresponding to the Body
element. |
COMMENT_SECTION
|
Enum
|
The type corresponding to the
|
DATE
|
Enum
|
The type corresponding to the Date
element. |
EQUATION
|
Enum
|
The type corresponding to the Equation
element. |
EQUATION_FUNCTION
|
Enum
|
The type corresponding to the Equation
element. |
EQUATION_FUNCTION_ARGUMENT_SEPARATOR
|
Enum
|
The type corresponding to the Equation
element. |
EQUATION_SYMBOL
|
Enum
|
The type corresponding to the Equation
element. |
RICH_LINK
|
Enum
|
The type corresponding to the Rich
element. |
FOOTER_SECTION
|
Enum
|
The type corresponding to the Footer
element. |
FOOTNOTE
|
Enum
|
The type corresponding to the Footnote
element. |
FOOTNOTE_SECTION
|
Enum
|
The type corresponding to the Footnote
element. |
HEADER_SECTION
|
Enum
|
The type corresponding to the Header
element. |
HORIZONTAL_RULE
|
Enum
|
The type corresponding to the Horizontal
element. |
INLINE_DRAWING
|
Enum
|
The type corresponding to the Inline
element. |
INLINE_IMAGE
|
Enum
|
The type corresponding to the Inline
element. |
LIST_ITEM
|
Enum
|
The type corresponding to the List
element. |
PAGE_BREAK
|
Enum
|
The type corresponding to the Page
element. |
PARAGRAPH
|
Enum
|
The type corresponding to the Paragraph
element. |
PERSON
|
Enum
|
The type corresponding to the Person
element. |
TABLE
|
Enum
|
The type corresponding to the Table
element. |
TABLE_CELL
|
Enum
|
The type corresponding to the Table
element. |
TABLE_OF_CONTENTS
|
Enum
|
The type corresponding to the Table
element. |
TABLE_ROW
|
Enum
|
The type corresponding to the Table
element. |
TEXT
|
Enum
|
The type corresponding to the Text
element. |
UNSUPPORTED
|
Enum
|
The type corresponding to Unsupported
. |
Equation
Methods
Method | Return type | Brief description |
---|---|---|
Equation
|
Clears the contents of the element. | |
Equation
|
Returns a detached, deep copy of the current element. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for a descendant of the specified type. | |
Range
|
Searches the contents of the element for a descendant of the specified type, starting from the
specified Range
. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the child element at the specified child index. | |
Integer
|
Retrieves the child index for the specified child element. | |
String
|
Retrieves the link url. | |
Element
|
Retrieves the element's next sibling element. | |
Integer
|
Retrieves the number of children. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Equation
|
Merges the element with the preceding sibling of the same type. | |
Equation
|
Removes the element from its parent. | |
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
Equation
|
Sets the element's attributes. | |
Equation
|
Sets the link url. | |
Equation
|
Sets the text alignment. |
Equation
Function
Methods
Method | Return type | Brief description |
---|---|---|
Equation
|
Clears the contents of the element. | |
Equation
|
Returns a detached, deep copy of the current element. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for a descendant of the specified type. | |
Range
|
Searches the contents of the element for a descendant of the specified type, starting from the
specified Range
. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the child element at the specified child index. | |
Integer
|
Retrieves the child index for the specified child element. | |
String
|
Retrieves the code corresponding to the equation function. | |
String
|
Retrieves the link url. | |
Element
|
Retrieves the element's next sibling element. | |
Integer
|
Retrieves the number of children. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Equation
|
Merges the element with the preceding sibling of the same type. | |
Equation
|
Removes the element from its parent. | |
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
Equation
|
Sets the element's attributes. | |
Equation
|
Sets the link url. | |
Equation
|
Sets the text alignment. |
Equation
Function
Argument
Separator
Methods
Method | Return type | Brief description |
---|---|---|
Equation
|
Returns a detached, deep copy of the current element. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the element's next sibling element. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Equation
|
Merges the element with the preceding sibling of the same type. | |
Equation
|
Removes the element from its parent. | |
Equation
|
Sets the element's attributes. |
Equation
Symbol
Methods
Method | Return type | Brief description |
---|---|---|
Equation
|
Returns a detached, deep copy of the current element. | |
Object
|
Retrieves the element's attributes. | |
String
|
Retrieves the code corresponding to the equation symbol. | |
Element
|
Retrieves the element's next sibling element. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Equation
|
Merges the element with the preceding sibling of the same type. | |
Equation
|
Removes the element from its parent. | |
Equation
|
Sets the element's attributes. |
Font
Family
Font
Family
Footer
Section
Methods
Method | Return type | Brief description |
---|---|---|
Horizontal
|
Creates and appends a new Horizontal
. |
|
Inline
|
Creates and appends a new Inline
from the specified image blob. |
|
Inline
|
Appends the given Inline
. |
|
List
|
Appends the given List
. |
|
List
|
Creates and appends a new List
containing the specified text contents. |
|
Paragraph
|
Appends the given Paragraph
. |
|
Paragraph
|
Creates and appends a new Paragraph
containing the specified text contents. |
|
Table
|
Creates and appends a new Table
. |
|
Table
|
Appends a new Table
containing a Table
for each specified string value. |
|
Table
|
Appends the given Table
. |
|
Footer
|
Clears the contents of the element. | |
Footer
|
Returns a detached, deep copy of the current element. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for a descendant of the specified type. | |
Range
|
Searches the contents of the element for a descendant of the specified type, starting from the
specified Range
. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the child element at the specified child index. | |
Integer
|
Retrieves the child index for the specified child element. | |
Inline
|
Retrieves all the Inline
contained in the section. |
|
List
|
Retrieves all the List
contained in the section. |
|
Integer
|
Retrieves the number of children. | |
Paragraph[]
|
Retrieves all the Paragraphs
contained in the section (including List
). |
|
Container
|
Retrieves the element's parent element. | |
Table[]
|
Retrieves all the Tables
contained in the section. |
|
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Element
|
Retrieves the element's Element
. |
|
Horizontal
|
Creates and inserts a new Horizontal
at the specified index. |
|
Inline
|
Creates and inserts an Inline
from the specified image blob, at the specified
index. |
|
Inline
|
Inserts the given Inline
at the specified index. |
|
List
|
Inserts the given List
at the specified index. |
|
List
|
Creates and inserts a new List
at the specified index, containing the specified
text contents. |
|
Paragraph
|
Inserts the given Paragraph
at the specified index. |
|
Paragraph
|
Creates and inserts a new Paragraph
at the specified index, containing the specified
text contents. |
|
Table
|
Creates and inserts a new Table
at the specified index. |
|
Table
|
Creates and inserts a new Table
containing the specified cells, at the specified index. |
|
Table
|
Inserts the given Table
at the specified index. |
|
Footer
|
Removes the specified child element. | |
Footer
|
Removes the element from its parent. | |
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
Footer
|
Sets the element's attributes. | |
Footer
|
Sets the contents as plain text. | |
Footer
|
Sets the text alignment. |
Footnote
Methods
Method | Return type | Brief description |
---|---|---|
Footnote
|
Returns a detached, deep copy of the current element. | |
Object
|
Retrieves the element's attributes. | |
Footnote
|
Retrieves the contents of the footnote element. | |
Element
|
Retrieves the element's next sibling element. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Footnote
|
Removes the element from its parent. | |
Footnote
|
Sets the element's attributes. |
Footnote
Section
Methods
Method | Return type | Brief description |
---|---|---|
Paragraph
|
Appends the given Paragraph
. |
|
Paragraph
|
Creates and appends a new Paragraph
containing the specified text contents. |
|
Footnote
|
Clears the contents of the element. | |
Footnote
|
Returns a detached, deep copy of the current element. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for a descendant of the specified type. | |
Range
|
Searches the contents of the element for a descendant of the specified type, starting from the
specified Range
. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the child element at the specified child index. | |
Integer
|
Retrieves the child index for the specified child element. | |
Element
|
Retrieves the element's next sibling element. | |
Integer
|
Retrieves the number of children. | |
Paragraph[]
|
Retrieves all the Paragraphs
contained in the section (including List
). |
|
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Element
|
Retrieves the element's Element
. |
|
Paragraph
|
Inserts the given Paragraph
at the specified index. |
|
Paragraph
|
Creates and inserts a new Paragraph
at the specified index, containing the specified
text contents. |
|
Footnote
|
Removes the specified child element. | |
Footnote
|
Removes the element from its parent. | |
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
Footnote
|
Sets the element's attributes. | |
Footnote
|
Sets the contents as plain text. | |
Footnote
|
Sets the text alignment. |
Glyph
Type
Properties
Property | Type | Description |
---|---|---|
BULLET
|
Enum
|
The default bullet, circular and filled. |
HOLLOW_BULLET
|
Enum
|
A hollow bullet. |
SQUARE_BULLET
|
Enum
|
A square bullet. |
NUMBER
|
Enum
|
A number based bullet. |
LATIN_UPPER
|
Enum
|
A latin, uppercase bullet. |
LATIN_LOWER
|
Enum
|
A latin, lowercase bullet. |
ROMAN_UPPER
|
Enum
|
A roman numeral, uppercase bullet. |
ROMAN_LOWER
|
Enum
|
A roman numeral, lowercase bullet. |
Header
Section
Methods
Method | Return type | Brief description |
---|---|---|
Horizontal
|
Creates and appends a new Horizontal
. |
|
Inline
|
Creates and appends a new Inline
from the specified image blob. |
|
Inline
|
Appends the given Inline
. |
|
List
|
Appends the given List
. |
|
List
|
Creates and appends a new List
containing the specified text contents. |
|
Paragraph
|
Appends the given Paragraph
. |
|
Paragraph
|
Creates and appends a new Paragraph
containing the specified text contents. |
|
Table
|
Creates and appends a new Table
. |
|
Table
|
Appends a new Table
containing a Table
for each specified string value. |
|
Table
|
Appends the given Table
. |
|
Header
|
Clears the contents of the element. | |
Header
|
Returns a detached, deep copy of the current element. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for a descendant of the specified type. | |
Range
|
Searches the contents of the element for a descendant of the specified type, starting from the
specified Range
. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the child element at the specified child index. | |
Integer
|
Retrieves the child index for the specified child element. | |
Inline
|
Retrieves all the Inline
contained in the section. |
|
List
|
Retrieves all the List
contained in the section. |
|
Integer
|
Retrieves the number of children. | |
Paragraph[]
|
Retrieves all the Paragraphs
contained in the section (including List
). |
|
Container
|
Retrieves the element's parent element. | |
Table[]
|
Retrieves all the Tables
contained in the section. |
|
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Element
|
Retrieves the element's Element
. |
|
Horizontal
|
Creates and inserts a new Horizontal
at the specified index. |
|
Inline
|
Creates and inserts an Inline
from the specified image blob, at the specified
index. |
|
Inline
|
Inserts the given Inline
at the specified index. |
|
List
|
Inserts the given List
at the specified index. |
|
List
|
Creates and inserts a new List
at the specified index, containing the specified
text contents. |
|
Paragraph
|
Inserts the given Paragraph
at the specified index. |
|
Paragraph
|
Creates and inserts a new Paragraph
at the specified index, containing the specified
text contents. |
|
Table
|
Creates and inserts a new Table
at the specified index. |
|
Table
|
Creates and inserts a new Table
containing the specified cells, at the specified index. |
|
Table
|
Inserts the given Table
at the specified index. |
|
Header
|
Removes the specified child element. | |
Header
|
Removes the element from its parent. | |
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
Header
|
Sets the element's attributes. | |
Header
|
Sets the contents as plain text. | |
Header
|
Sets the text alignment. |
Horizontal
Alignment
Properties
Property | Type | Description |
---|---|---|
LEFT
|
Enum
|
The left-alignment option. |
CENTER
|
Enum
|
The center-alignment option. |
RIGHT
|
Enum
|
The right-alignment option. |
JUSTIFY
|
Enum
|
The justify-alignment option. |
Horizontal
Rule
Methods
Method | Return type | Brief description |
---|---|---|
Horizontal
|
Returns a detached, deep copy of the current element. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the element's next sibling element. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Horizontal
|
Removes the element from its parent. | |
Horizontal
|
Sets the element's attributes. |
Inline
Drawing
Methods
Method | Return type | Brief description |
---|---|---|
Inline
|
Returns a detached, deep copy of the current element. | |
String
|
Returns the drawing's alternate description. | |
String
|
Returns the drawing's alternate title. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the element's next sibling element. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Inline
|
Merges the element with the preceding sibling of the same type. | |
Inline
|
Removes the element from its parent. | |
Inline
|
Sets the drawing's alternate description. | |
Inline
|
Sets the drawing's alternate title. | |
Inline
|
Sets the element's attributes. |
Inline
Image
Methods
Method | Return type | Brief description |
---|---|---|
Inline
|
Returns a detached, deep copy of the current element. | |
String
|
Returns the image's alternate description. | |
String
|
Returns the image's alternate title. | |
Blob
|
Return the data inside this object as a blob converted to the specified content type. | |
Object
|
Retrieves the element's attributes. | |
Blob
|
Return the data inside this object as a blob. | |
Integer
|
Retrieves the image's height, in pixels. | |
String
|
Retrieves the link URL. | |
Element
|
Retrieves the element's next sibling element. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
Element
|
Retrieves the element's Element
. |
|
Integer
|
Retrieves the image's width, in pixels. | |
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Inline
|
Merges the element with the preceding sibling of the same type. | |
Inline
|
Removes the element from its parent. | |
Inline
|
Sets the image's alternate description. | |
Inline
|
Sets the image's alternate title. | |
Inline
|
Sets the element's attributes. | |
Inline
|
Sets the image's height, in pixels. | |
Inline
|
Sets the link URL. | |
Inline
|
Sets the image's width, in pixels. |
List
Item
Methods
Method | Return type | Brief description |
---|---|---|
Positioned
|
Creates and inserts a new Positioned
from the specified image blob. |
|
Horizontal
|
Creates and appends a new Horizontal
. |
|
Inline
|
Creates and appends a new Inline
from the specified image blob. |
|
Inline
|
Appends the given Inline
. |
|
Page
|
Creates and appends a new Page
. |
|
Page
|
Appends the given Page
. |
|
Text
|
Creates and appends a new Text
element with the specified contents. |
|
Text
|
Appends the given Text
element. |
|
List
|
Clears the contents of the element. | |
List
|
Returns a detached, deep copy of the current element. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for a descendant of the specified type. | |
Range
|
Searches the contents of the element for a descendant of the specified type, starting from the
specified Range
. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Horizontal
|
Retrieves the Horizontal
. |
|
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the child element at the specified child index. | |
Integer
|
Retrieves the child index for the specified child element. | |
Glyph
|
Retrieves the list item's Glyph
. |
|
Paragraph
|
Retrieves the Paragraph
. |
|
Number
|
Retrieves the end indentation, in points. | |
Number
|
Retrieves the first line indentation, in points. | |
Number
|
Retrieves the start indentation. | |
Number
|
Retrieves the line spacing, in points. | |
String
|
Retrieves the link url. | |
String
|
Retrieves the list ID. | |
Integer
|
Retrieves the list item's nesting level. | |
Element
|
Retrieves the element's next sibling element. | |
Integer
|
Retrieves the number of children. | |
Container
|
Retrieves the element's parent element. | |
Positioned
|
Gets a Positioned
by the image's ID. |
|
Positioned
|
Gets all Positioned
objects anchored to the paragraph. |
|
Element
|
Retrieves the element's previous sibling element. | |
Number
|
Retrieves the spacing after the element, in points. | |
Number
|
Retrieves the spacing before the element, in points. | |
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Element
|
Retrieves the element's Element
. |
|
Horizontal
|
Creates and inserts a Horizontal
at the specified index. |
|
Inline
|
Creates and inserts a new Inline
from the specified image blob, at the specified
index. |
|
Inline
|
Inserts the given Inline
at the specified index. |
|
Page
|
Creates and inserts a new Page
at the specified index. |
|
Page
|
Inserts the given Page
at the specified index. |
|
Text
|
Creates and inserts a new text element at the specified index. | |
Text
|
Inserts the given Text
element at the specified index, with the specified text
contents. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Boolean
|
Retrieves the left-to-right setting. | |
List
|
Merges the element with the preceding sibling of the same type. | |
List
|
Removes the specified child element. | |
List
|
Removes the element from its parent. | |
Boolean
|
Removes a Positioned
by the image's ID. |
|
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
List
|
Sets the Horizontal
. |
|
List
|
Sets the element's attributes. | |
List
|
Sets the list item's Glyph
. |
|
List
|
Sets the Paragraph
. |
|
List
|
Sets the end indentation, in points. | |
List
|
Sets the first line indentation, in points. | |
List
|
Sets the start indentation, in points. | |
List
|
Sets the left-to-right setting. | |
List
|
Sets the line spacing, as a quantity indicating the number of lines to use for spacing. | |
List
|
Sets the link url. | |
List
|
Sets the list ID. | |
List
|
Sets the list item's nesting level. | |
List
|
Sets the spacing after the element, in points. | |
List
|
Sets the spacing before the element, in points. | |
void
|
Sets the contents of the list item as text. | |
List
|
Sets the text alignment. |
Named
Range
Methods
Method | Return type | Brief description |
---|---|---|
String
|
Gets the ID of this Named
. |
|
String
|
Gets the name of this Named
. |
|
Range
|
Gets the range of elements associated with this Named
. |
|
void
|
Removes this Named
from the tab. |
Page
Break
Methods
Method | Return type | Brief description |
---|---|---|
Page
|
Returns a detached, deep copy of the current element. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the element's next sibling element. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Page
|
Removes the element from its parent. | |
Page
|
Sets the element's attributes. |
Paragraph
Methods
Method | Return type | Brief description |
---|---|---|
Positioned
|
Creates and inserts a new Positioned
from the specified image blob. |
|
Horizontal
|
Creates and appends a new Horizontal
. |
|
Inline
|
Creates and appends a new Inline
from the specified image blob. |
|
Inline
|
Appends the given Inline
. |
|
Page
|
Creates and appends a new Page
. |
|
Page
|
Appends the given Page
. |
|
Text
|
Creates and appends a new Text
element with the specified contents. |
|
Text
|
Appends the given Text
element. |
|
Paragraph
|
Clears the contents of the element. | |
Paragraph
|
Returns a detached, deep copy of the current element. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for a descendant of the specified type. | |
Range
|
Searches the contents of the element for a descendant of the specified type, starting from the
specified Range
. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Horizontal
|
Retrieves the Horizontal
. |
|
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the child element at the specified child index. | |
Integer
|
Retrieves the child index for the specified child element. | |
Paragraph
|
Retrieves the Paragraph
. |
|
Number
|
Retrieves the end indentation, in points. | |
Number
|
Retrieves the first line indentation, in points. | |
Number
|
Retrieves the start indentation. | |
Number
|
Retrieves the line spacing, in points. | |
String
|
Retrieves the link url. | |
Element
|
Retrieves the element's next sibling element. | |
Integer
|
Retrieves the number of children. | |
Container
|
Retrieves the element's parent element. | |
Positioned
|
Gets a Positioned
by the image's ID. |
|
Positioned
|
Gets all Positioned
objects anchored to the paragraph. |
|
Element
|
Retrieves the element's previous sibling element. | |
Number
|
Retrieves the spacing after the element, in points. | |
Number
|
Retrieves the spacing before the element, in points. | |
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Element
|
Retrieves the element's Element
. |
|
Horizontal
|
Creates and inserts a Horizontal
at the specified index. |
|
Inline
|
Creates and inserts a new Inline
from the specified image blob, at the specified
index. |
|
Inline
|
Inserts the given Inline
at the specified index. |
|
Page
|
Creates and inserts a new Page
at the specified index. |
|
Page
|
Inserts the given Page
at the specified index. |
|
Text
|
Creates and inserts a new text element at the specified index. | |
Text
|
Inserts the given Text
element at the specified index, with the specified text
contents. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Boolean
|
Retrieves the left-to-right setting. | |
Paragraph
|
Merges the element with the preceding sibling of the same type. | |
Paragraph
|
Removes the specified child element. | |
Paragraph
|
Removes the element from its parent. | |
Boolean
|
Removes a Positioned
by the image's ID. |
|
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
Paragraph
|
Sets the Horizontal
. |
|
Paragraph
|
Sets the element's attributes. | |
Paragraph
|
Sets the Paragraph
. |
|
Paragraph
|
Sets the end indentation, in points. | |
Paragraph
|
Sets the first line indentation, in points. | |
Paragraph
|
Sets the start indentation, in points. | |
Paragraph
|
Sets the left-to-right setting. | |
Paragraph
|
Sets the line spacing, as a quantity indicating the number of lines to use for spacing. | |
Paragraph
|
Sets the link url. | |
Paragraph
|
Sets the spacing after the element, in points. | |
Paragraph
|
Sets the spacing before the element, in points. | |
void
|
Sets the contents of the paragraph as text. | |
Paragraph
|
Sets the text alignment. |
Paragraph
Heading
Properties
Property | Type | Description |
---|---|---|
NORMAL
|
Enum
|
The heading option for normal text. |
HEADING1
|
Enum
|
The highest heading option. |
HEADING2
|
Enum
|
The second heading option. |
HEADING3
|
Enum
|
The third heading option |
HEADING4
|
Enum
|
The fourth heading option. |
HEADING5
|
Enum
|
The fifth heading option. |
HEADING6
|
Enum
|
The lowest heading option. |
TITLE
|
Enum
|
The title heading option. |
SUBTITLE
|
Enum
|
The subtitle heading option. |
Person
Methods
Method | Return type | Brief description |
---|---|---|
Person
|
Returns a detached, deep copy of the current element. | |
Object
|
Retrieves the element's attributes. | |
String
|
Returns the person's email address. | |
String
|
Returns the person's display name, if set. | |
Element
|
Retrieves the element's next sibling element. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Person
|
Merges the element with the preceding sibling of the same type. | |
Person
|
Removes the element from its parent. | |
Person
|
Sets the element's attributes. |
Position
Methods
Method | Return type | Brief description |
---|---|---|
Element
|
Gets the element that contains this Position
. |
|
Integer
|
Gets this Position
's relative location within the element that contains it. |
|
Text
|
Creates an artificial Text
element that represents the text and formatting of the Paragraph
or List
that contains the Position
, either directly or through a chain of child elements. |
|
Integer
|
Gets the offset of this Position
within the Text
element returned by get
. |
|
Bookmark
|
Creates and inserts a new Bookmark
at this Position
. |
|
Inline
|
Creates and inserts a new Inline
at this Position
from the specified image
blob. |
|
Text
|
Inserts the specified text at this Position
. |
Positioned
Image
Methods
Method | Return type | Brief description |
---|---|---|
Blob
|
Return the data inside this object as a blob converted to the specified content type. | |
Blob
|
Return the data inside this object as a blob. | |
Integer
|
Retrieves the image's height, in pixels. | |
String
|
Gets the image's ID. | |
Positioned
|
Gets an enum value that represents how the image is laid out. | |
Number
|
Gets the image's offset, in points, from the paragraph's left. | |
Paragraph
|
Gets the Paragraph
the image is anchored to. |
|
Number
|
Gets the image's offset, in points, from the paragraph's top. | |
Integer
|
Retrieves the image's width, in pixels. | |
Positioned
|
Sets the image's height, in pixels. | |
Positioned
|
Sets the definition of how the image is laid out. | |
Positioned
|
Sets the image's offset, in points, from the paragraph's left. | |
Positioned
|
Sets the image's offset, in points, from the paragraph's top. | |
Positioned
|
Sets the image's width, in pixels. |
Positioned
Layout
Properties
Property | Type | Description |
---|---|---|
ABOVE_TEXT
|
Enum
|
The image is positioned above the text. |
BREAK_BOTH
|
Enum
|
The image breaks the text on the left and right. |
BREAK_LEFT
|
Enum
|
The image breaks the text on the left. |
BREAK_RIGHT
|
Enum
|
The image breaks the text on the right. |
WRAP_TEXT
|
Enum
|
The image is wrapped by text. |
Range
Methods
Method | Return type | Brief description |
---|---|---|
Range
|
Gets all elements in this Range
, including any partial Text
elements (for example, in the case
of a selection that includes only part of a Text
element). |
Range
Builder
Methods
Method | Return type | Brief description |
---|---|---|
Range
|
Adds an entire Element
to this Range
. |
|
Range
|
Adds a partial Text
element to this Range
. |
|
Range
|
Adds two entire elements, and all elements between them, to this Range
. |
|
Range
|
Adds two partial Text
elements, and all elements between them, to the Range
. |
|
Range
|
Adds the contents of another Range
to this Range
. |
|
Range
|
Constructs a Range
from the settings applied to the builder. |
|
Range
|
Gets all elements in this Range
, including any partial Text
elements (for example, in the case
of a selection that includes only part of a Text
element). |
Range
Element
Methods
Method | Return type | Brief description |
---|---|---|
Element
|
Gets the Element
that corresponds to this Range
. |
|
Integer
|
Gets the position of the end of a partial range within the range element. | |
Integer
|
Gets the position of the start of a partial range within the range element. | |
Boolean
|
Determines whether this range element covers the entire element or a partial selection of the element's characters. |
Rich
Link
Methods
Method | Return type | Brief description |
---|---|---|
Rich
|
Returns a detached, deep copy of the current element. | |
Object
|
Retrieves the element's attributes. | |
String
|
Returns the MIME type
of
the link, which is available when the item is a link to a Drive file and null
otherwise. |
|
Element
|
Retrieves the element's next sibling element. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
String
|
Returns the link's displayed title. | |
Element
|
Retrieves the element's Element
. |
|
String
|
Returns the URL of the resource. | |
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Rich
|
Merges the element with the preceding sibling of the same type. | |
Rich
|
Removes the element from its parent. | |
Rich
|
Sets the element's attributes. |
Tab
Methods
Method | Return type | Brief description |
---|---|---|
Document
|
Retrieves the tab contents as a Document
. |
|
Tab[]
|
Retrieves the child tabs nested within this tab. | |
String
|
Retrieves the ID of the tab. | |
Integer
|
Retrieves the 0-based index of the tab within the parent. | |
String
|
Retrieves the title of the tab. | |
Tab
|
Retrieves the type of tab. |
Tab
Type
Properties
Property | Type | Description |
---|---|---|
DOCUMENT_TAB
|
Enum
|
The type corresponding to Document
. |
Table
Methods
Method | Return type | Brief description |
---|---|---|
Table
|
Creates and appends a new Table
. |
|
Table
|
Appends the given Table
. |
|
Table
|
Clears the contents of the element. | |
Table
|
Returns a detached, deep copy of the current element. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for a descendant of the specified type. | |
Range
|
Searches the contents of the element for a descendant of the specified type, starting from the
specified Range
. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Object
|
Retrieves the element's attributes. | |
String
|
Retrieves the border color. | |
Number
|
Retrieves the border width, in points. | |
Table
|
Retrieves the Table
at the specified row and cell indices. |
|
Element
|
Retrieves the child element at the specified child index. | |
Integer
|
Retrieves the child index for the specified child element. | |
Number
|
Retrieves the width of the specified table column, in points. | |
String
|
Retrieves the link url. | |
Element
|
Retrieves the element's next sibling element. | |
Integer
|
Retrieves the number of children. | |
Integer
|
Retrieves the number of Table
. |
|
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
Table
|
Retrieves the Table
at the specified row index. |
|
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Element
|
Retrieves the element's Element
. |
|
Table
|
Creates and inserts a new Table
at the specified index. |
|
Table
|
Inserts the given Table
at the specified index. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Table
|
Removes the specified child element. | |
Table
|
Removes the element from its parent. | |
Table
|
Removes the Table
at the specified row index. |
|
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
Table
|
Sets the element's attributes. | |
Table
|
Sets the border color. | |
Table
|
Sets the border width, in points. | |
Table
|
Sets the width of the specified column, in points. | |
Table
|
Sets the link url. | |
Table
|
Sets the text alignment. |
Table
Cell
Methods
Method | Return type | Brief description |
---|---|---|
Horizontal
|
Creates and appends a new Horizontal
. |
|
Inline
|
Creates and appends a new Inline
from the specified image blob. |
|
Inline
|
Appends the given Inline
. |
|
List
|
Appends the given List
. |
|
List
|
Creates and appends a new List
. |
|
Paragraph
|
Appends the given Paragraph
. |
|
Paragraph
|
Creates and appends a new Paragraph
. |
|
Table
|
Creates and appends a new Table
. |
|
Table
|
Appends a new Table
containing the specified cells. |
|
Table
|
Appends the given Table
. |
|
Table
|
Clears the contents of the element. | |
Table
|
Returns a detached, deep copy of the current element. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for a descendant of the specified type. | |
Range
|
Searches the contents of the element for a descendant of the specified type, starting from the
specified Range
. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Object
|
Retrieves the element's attributes. | |
String
|
Retrieves the background color. | |
Element
|
Retrieves the child element at the specified child index. | |
Integer
|
Retrieves the child index for the specified child element. | |
Integer
|
Retrieves the column span, which is the number of columns of table cells this cell spans. | |
String
|
Retrieves the link url. | |
Element
|
Retrieves the element's next sibling element. | |
Integer
|
Retrieves the number of children. | |
Number
|
Retrieves the bottom padding, in points. | |
Number
|
Retrieves the left padding, in points. | |
Number
|
Retrieves the right padding, in points. | |
Number
|
Retrieves the top padding, in points. | |
Container
|
Retrieves the element's parent element. | |
Table
|
Retrieves the Table
containing the current Table
. |
|
Table
|
Retrieves the Table
containing the current Table
. |
|
Element
|
Retrieves the element's previous sibling element. | |
Integer
|
Retrieves the row span, which is the number of rows of table cells this cell spans. | |
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Element
|
Retrieves the element's Element
. |
|
Vertical
|
Retrieves the Vertical
. |
|
Number
|
Retrieves the width of the column containing the cell, in points. | |
Horizontal
|
Creates and inserts a new Horizontal
at the specified index. |
|
Inline
|
Creates and inserts an Inline
from the specified image blob, at the specified
index. |
|
Inline
|
Inserts the given Inline
at the specified index. |
|
List
|
Inserts the given List
at the specified index. |
|
List
|
Creates and inserts a new List
at the specified index. |
|
Paragraph
|
Inserts the given Paragraph
at the specified index. |
|
Paragraph
|
Creates and inserts a new Paragraph
at the specified index. |
|
Table
|
Creates and inserts a new Table
at the specified index. |
|
Table
|
Creates and inserts a new Table
containing the specified cells, at the specified index. |
|
Table
|
Inserts the given Table
at the specified index. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Table
|
Merges the element with the preceding sibling of the same type. | |
Table
|
Removes the specified child element. | |
Table
|
Removes the element from its parent. | |
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
Table
|
Sets the element's attributes. | |
Table
|
Sets the background color. | |
Table
|
Sets the link url. | |
Table
|
Sets the bottom padding, in points. | |
Table
|
Sets the left padding, in points. | |
Table
|
Sets the right padding, in points. | |
Table
|
Sets the top padding, in points. | |
Table
|
Sets the contents as plain text. | |
Table
|
Sets the text alignment. | |
Table
|
Sets the vertical alignment. | |
Table
|
Sets the width of the column containing the current cell, in points. |
Table
Of
Contents
Methods
Method | Return type | Brief description |
---|---|---|
Table
|
Clears the contents of the element. | |
Table
|
Returns a detached, deep copy of the current element. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for a descendant of the specified type. | |
Range
|
Searches the contents of the element for a descendant of the specified type, starting from the
specified Range
. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the child element at the specified child index. | |
Integer
|
Retrieves the child index for the specified child element. | |
String
|
Retrieves the link url. | |
Element
|
Retrieves the element's next sibling element. | |
Integer
|
Retrieves the number of children. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Table
|
Removes the element from its parent. | |
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
Table
|
Sets the element's attributes. | |
Table
|
Sets the link url. | |
Table
|
Sets the text alignment. |
Table
Row
Methods
Method | Return type | Brief description |
---|---|---|
Table
|
Creates and appends a new Table
. |
|
Table
|
Appends the given Table
containing the specified text. |
|
Table
|
Appends the given Table
. |
|
Table
|
Clears the contents of the element. | |
Table
|
Returns a detached, deep copy of the current element. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for a descendant of the specified type. | |
Range
|
Searches the contents of the element for a descendant of the specified type, starting from the
specified Range
. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Object
|
Retrieves the element's attributes. | |
Table
|
Retrieves the Table
at the specified cell index. |
|
Element
|
Retrieves the child element at the specified child index. | |
Integer
|
Retrieves the child index for the specified child element. | |
String
|
Retrieves the link url. | |
Number
|
Retrieves the minimum height, in points. | |
Element
|
Retrieves the element's next sibling element. | |
Integer
|
Retrieves the number of cells in the row. | |
Integer
|
Retrieves the number of children. | |
Container
|
Retrieves the element's parent element. | |
Table
|
Retrieves the Table
containing the current row. |
|
Element
|
Retrieves the element's previous sibling element. | |
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Element
|
Retrieves the element's Element
. |
|
Table
|
Creates and inserts a new Table
at the specified index. |
|
Table
|
Inserts the given Table
at the specified index, containing the given text. |
|
Table
|
Inserts the given Table
at the specified index. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Table
|
Merges the element with the preceding sibling of the same type. | |
Table
|
Removes the Table
at the specified cell index. |
|
Table
|
Removes the specified child element. | |
Table
|
Removes the element from its parent. | |
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
Table
|
Sets the element's attributes. | |
Table
|
Sets the link url. | |
Table
|
Sets the minimum height, in points. | |
Table
|
Sets the text alignment. |
Text
Methods
Method | Return type | Brief description |
---|---|---|
Text
|
Adds the specified text to the end of this text region. | |
Text
|
Returns a detached, deep copy of the current element. | |
Text
|
Deletes a range of text. | |
Text
|
Obtains a Text
version of the current element, for editing. |
|
Range
|
Searches the contents of the element for the specified text pattern using regular expressions. | |
Range
|
Searches the contents of the element for the specified text pattern, starting from a given search result. | |
Object
|
Retrieves the element's attributes. | |
Object
|
Retrieves the attributes at the specified character offset. | |
String
|
Retrieves the background color setting. | |
String
|
Retrieves the background color at the specified character offset. | |
String
|
Retrieves the font family setting. | |
String
|
Retrieves the font family at the specified character offset. | |
Number
|
Retrieves the font size setting. | |
Number
|
Retrieves the font size at the specified character offset. | |
String
|
Retrieves the foreground color setting. | |
String
|
Retrieves the foreground color at the specified character offset. | |
String
|
Retrieves the link url. | |
String
|
Retrieves the link URL at the specified character offset. | |
Element
|
Retrieves the element's next sibling element. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
String
|
Retrieves the contents of the element as a text string. | |
Text
|
Gets the text alignment. | |
Text
|
Gets the text alignment for a single character. | |
Integer[]
|
Retrieves the set of text indices that correspond to the start of distinct text formatting runs. | |
Element
|
Retrieves the element's Element
. |
|
Text
|
Inserts the specified text at the given character offset. | |
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Boolean
|
Retrieves the bold setting. | |
Boolean
|
Retrieves the bold setting at the specified character offset. | |
Boolean
|
Retrieves the italic setting. | |
Boolean
|
Retrieves the italic setting at the specified character offset. | |
Boolean
|
Retrieves the strikethrough setting. | |
Boolean
|
Retrieves the strikethrough setting at the specified character offset. | |
Boolean
|
Retrieves the underline setting. | |
Boolean
|
Retrieves the underline setting at the specified character offset. | |
Text
|
Merges the element with the preceding sibling of the same type. | |
Text
|
Removes the element from its parent. | |
Element
|
Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. | |
Text
|
Applies the specified attributes to the given character range. | |
Text
|
Sets the element's attributes. | |
Text
|
Sets the background color for the specified character range. | |
Text
|
Sets the background color. | |
Text
|
Sets the bold setting. | |
Text
|
Sets the bold setting for the specified character range. | |
Text
|
Sets the font family for the specified character range. | |
Text
|
Sets the font family. | |
Text
|
Sets the font size for the specified character range. | |
Text
|
Sets the font size. | |
Text
|
Sets the foreground color for the specified character range. | |
Text
|
Sets the foreground color. | |
Text
|
Sets the italic setting. | |
Text
|
Sets the italic setting for the specified character range. | |
Text
|
Sets the link URL for the specified character range. | |
Text
|
Sets the link url. | |
Text
|
Sets the strikethrough setting. | |
Text
|
Sets the strikethrough setting for the specified character range. | |
Text
|
Sets the text contents. | |
Text
|
Sets the text alignment for a given character range. | |
Text
|
Sets the text alignment. | |
Text
|
Sets the underline setting. | |
Text
|
Sets the underline setting for the specified character range. |
Text
Alignment
Properties
Property | Type | Description |
---|---|---|
NORMAL
|
Enum
|
The normal text alignment. |
SUPERSCRIPT
|
Enum
|
The superscript text alignment. |
SUBSCRIPT
|
Enum
|
The subscript text alignment. |
Unsupported
Element
Methods
Method | Return type | Brief description |
---|---|---|
Unsupported
|
Returns a detached, deep copy of the current element. | |
Object
|
Retrieves the element's attributes. | |
Element
|
Retrieves the element's next sibling element. | |
Container
|
Retrieves the element's parent element. | |
Element
|
Retrieves the element's previous sibling element. | |
Element
|
Retrieves the element's Element
. |
|
Boolean
|
Determines whether the element is at the end of the Document
. |
|
Unsupported
|
Merges the element with the preceding sibling of the same type. | |
Unsupported
|
Removes the element from its parent. | |
Unsupported
|
Sets the element's attributes. |
Vertical
Alignment
Properties
Property | Type | Description |
---|---|---|
BOTTOM
|
Enum
|
The bottom-alignment option. |
CENTER
|
Enum
|
The center-alignment option. |
TOP
|
Enum
|
The top-alignment option. |