This service allows scripts to create, access, and modify Google Docs files.
// Open a document by ID.
var doc = DocumentApp.openById('DOCUMENT_ID_GOES_HERE');
// Create and open a document.
doc = DocumentApp.create('Document Name');
Classes
Name | Brief description |
---|---|
Attribute | An enumeration of the element attributes. |
Body | An element representing a document body. |
Bookmark | An object representing a bookmark. |
ContainerElement | A generic element that may contain other elements. |
Document | A document, containing rich text and elements such as tables and lists. |
DocumentApp | The document service creates and opens Documents that can be edited. |
Element | A generic element. |
ElementType | An enumeration of all the element types. |
Equation | An element representing a mathematical expression. |
EquationFunction | An element representing a function in a mathematical Equation . |
EquationFunctionArgumentSeparator | An element representing a function separator in a mathematical Equation . |
EquationSymbol | An element representing a symbol in a mathematical Equation . |
FontFamily | An enumeration of the supported fonts. |
FooterSection | An element representing a footer section. |
Footnote | An element representing a footnote. |
FootnoteSection | An element representing a footnote section. |
GlyphType | An enumeration of the supported glyph types. |
HeaderSection | An element representing a header section. |
HorizontalAlignment | An enumeration of the supported horizontal alignment types. |
HorizontalRule | An element representing an horizontal rule. |
InlineDrawing | An element representing an embedded drawing. |
InlineImage | An element representing an embedded image. |
ListItem | An element representing a list item. |
NamedRange | A Range that has a name and ID to allow later retrieval. |
PageBreak | An element representing a page break. |
Paragraph | An element representing a paragraph. |
ParagraphHeading | An enumeration of the standard paragraph headings. |
Position | A reference to a location in the document, relative to a specific element. |
Range | A range of elements in a document. |
RangeBuilder | A builder used to construct RangeBuilder objects from document elements. |
RangeElement | A wrapper around an Element with a possible start and end offset. |
Table | An element representing a table. |
TableCell | An element representing a table cell. |
TableOfContents | An element containing a table of contents. |
TableRow | An element representing a table row. |
Text | An element representing a rich text region. |
TextAlignment | An enumeration of the type of text alignments. |
UnsupportedElement | An element representing a region that is unknown or cannot be affected by a script, such as a page number. |
VerticalAlignment | An enumeration of the supported vertical alignment types. |
Class 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,
DocumentApp.ParagraphHeading.HEADING1 ). |
HEIGHT | Enum | The height setting, for image elements. |
HORIZONTAL_ALIGNMENT | Enum | The horizontal alignment, for paragraph elements (for example,
DocumentApp.HorizontalAlignment.CENTER ). |
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. |
Class Body
Methods
Method | Return type | Brief description |
---|---|---|
appendHorizontalRule() | HorizontalRule | Creates and appends a new HorizontalRule . |
appendImage(image) | InlineImage | Creates and appends a new InlineImage from the specified
image blob. |
appendImage(image) | InlineImage | Appends the given InlineImage . |
appendListItem(listItem) | ListItem | Appends the given ListItem . |
appendListItem(text) | ListItem | Creates and appends a new ListItem containing the specified text
contents. |
appendPageBreak() | PageBreak | Creates and appends a new PageBreak . |
appendPageBreak(pageBreak) | PageBreak | Appends the given PageBreak . |
appendParagraph(paragraph) | Paragraph | Appends the given Paragraph . |
appendParagraph(text) | Paragraph | Creates and appends a new Paragraph containing the specified text
contents. |
appendTable() | Table | Creates and appends a new Table . |
appendTable(cells) | Table | Appends a new Table containing a TableCell for each
specified string value. |
appendTable(table) | Table | Appends the given Table . |
clear() | Body | Clears the contents of the element. |
copy() | Body | Returns a detached, deep copy of the current element. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findElement(elementType) | RangeElement | Searches the contents of the element for a descendant of the specified type. |
findElement(elementType, from) | RangeElement | Searches the contents of the element for a descendant of the specified
type, starting from the specified RangeElement . |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAttributes() | Object | Retrieves the element's attributes. |
getChild(childIndex) | Element | Retrieves the child element at the specified child index. |
getChildIndex(child) | Integer | Retrieves the child index for the specified child element. |
getImages() | InlineImage[] | Retrieves all the InlineImages contained in the section. |
getListItems() | ListItem[] | Retrieves all the ListItems contained in the section. |
getMarginBottom() | Number | Retrieves the bottom margin, in points. |
getMarginLeft() | Number | Retrieves the left margin, in points. |
getMarginRight() | Number | Retrieves the right margin. |
getMarginTop() | Number | Retrieves the top margin. |
getNumChildren() | Integer | Retrieves the number of children. |
getPageHeight() | Number | Retrieves the page height, in points. |
getPageWidth() | Number | Retrieves the page width, in points. |
getParagraphs() | Paragraph[] | Retrieves all the Paragraphs contained in the section. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getTables() | Table[] | Retrieves all the Tables contained in the section. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getType() | ElementType | Retrieves the element's ElementType . |
insertHorizontalRule(childIndex) | HorizontalRule | Creates and inserts a new HorizontalRule at the specified index. |
insertImage(childIndex, image) | InlineImage | Creates and inserts an InlineImage from the specified image blob,
at the specified index. |
insertImage(childIndex, image) | InlineImage | Inserts the given InlineImage at the specified index. |
insertListItem(childIndex, listItem) | ListItem | Inserts the given ListItem at the specified index. |
insertListItem(childIndex, text) | ListItem | Creates and inserts a new ListItem at the specified index,
containing the specified text contents. |
insertPageBreak(childIndex) | PageBreak | Creates and inserts a new PageBreak at the specified index. |
insertPageBreak(childIndex, pageBreak) | PageBreak | Inserts the given PageBreak at the specified index. |
insertParagraph(childIndex, paragraph) | Paragraph | Inserts the given Paragraph at the specified index. |
insertParagraph(childIndex, text) | Paragraph | Creates and inserts a new Paragraph at the specified index,
containing the specified text contents. |
insertTable(childIndex) | Table | Creates and inserts a new Table at the specified index. |
insertTable(childIndex, cells) | Table | Creates and inserts a new Table containing the specified cells,
at the specified index. |
insertTable(childIndex, table) | Table | Inserts the given Table at the specified index. |
removeChild(child) | Body | Removes the specified child element. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAttributes(attributes) | Body | Sets the element's attributes. |
setMarginBottom(marginBottom) | Body | Sets the bottom margin, in points. |
setMarginLeft(marginLeft) | Body | Sets the left margin, in points. |
setMarginRight(marginRight) | Body | Sets the right margin, in points. |
setMarginTop(marginTop) | Body | Sets the top margin. |
setPageHeight(pageHeight) | Body | Sets the page height, in points. |
setPageWidth(pageWidth) | Body | Sets the page width, in points. |
setText(text) | Body | Sets the contents as plain text. |
setTextAlignment(textAlignment) | Body | Sets the text alignment. |
Class Bookmark
Methods
Method | Return type | Brief description |
---|---|---|
getId() | String | Gets the ID of the Bookmark . |
getPosition() | Position | Gets the Position of the Bookmark within the Document . |
remove() | void | Deletes the Bookmark . |
Class ContainerElement
Methods
Method | Return type | Brief description |
---|---|---|
asBody() | Body | Returns the current element as a Body . |
asEquation() | Equation | Returns the current element as a Equation . |
asFooterSection() | FooterSection | Returns the current element as a FooterSection . |
asFootnoteSection() | FootnoteSection | Returns the current element as a FootnoteSection . |
asHeaderSection() | HeaderSection | Returns the current element as a HeaderSection . |
asListItem() | ListItem | Returns the current element as a ListItem . |
asParagraph() | Paragraph | Returns the current element as a Paragraph . |
asTable() | Table | Returns the current element as a Table . |
asTableCell() | TableCell | Returns the current element as a TableCell . |
asTableOfContents() | TableOfContents | Returns the current element as a TableOfContents . |
asTableRow() | TableRow | Returns the current element as a TableRow . |
clear() | ContainerElement | Clears the contents of the element. |
copy() | ContainerElement | Returns a detached, deep copy of the current element. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findElement(elementType) | RangeElement | Searches the contents of the element for a descendant of the specified type. |
findElement(elementType, from) | RangeElement | Searches the contents of the element for a descendant of the specified
type, starting from the specified RangeElement . |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAttributes() | Object | Retrieves the element's attributes. |
getChild(childIndex) | Element | Retrieves the child element at the specified child index. |
getChildIndex(child) | Integer | Retrieves the child index for the specified child element. |
getLinkUrl() | String | Retrieves the link url. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getNumChildren() | Integer | Retrieves the number of children. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getType() | ElementType | Retrieves the element's ElementType . |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
merge() | ContainerElement | Merges the element with the preceding sibling of the same type. |
removeFromParent() | ContainerElement | Removes the element from its parent. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAttributes(attributes) | ContainerElement | Sets the element's attributes. |
setLinkUrl(url) | ContainerElement | Sets the link url. |
setTextAlignment(textAlignment) | ContainerElement | Sets the text alignment. |
Class Document
Methods
Method | Return type | Brief description |
---|---|---|
addBookmark(position) | Bookmark | Adds a Bookmark at the given Position . |
addEditor(emailAddress) | Document | Adds the given user to the list of editors for the Document . |
addEditor(user) | Document | Adds the given user to the list of editors for the Document . |
addEditors(emailAddresses) | Document | Adds the given array of users to the list of editors for the Document . |
addFooter() | FooterSection | Adds a document footer section, if none exists. |
addHeader() | HeaderSection | Adds a document header section, if none exists. |
addNamedRange(name, range) | NamedRange | Adds a new NamedRange , which is a Range that has a name and ID to allow
later retrieval. |
addViewer(emailAddress) | Document | Adds the given user to the list of viewers for the Document . |
addViewer(user) | Document | Adds the given user to the list of viewers for the Document . |
addViewers(emailAddresses) | Document | Adds the given array of users to the list of viewers for the Document . |
getAs(contentType) | Blob | Retrieves the current Document contents as a blob of the specified
type. |
getBlob() | Blob | Retrieves the current Document contents as a blob. |
getBody() | Body | Retrieves the active document's Body . |
getBookmark(id) | Bookmark | Gets the Bookmark with the given ID. |
getBookmarks() | Bookmark[] | Gets all Bookmark objects in the document. |
getCursor() | Position | Gets the user's cursor in the active document. |
getEditors() | User[] | Gets the list of editors for this Document . |
getFooter() | FooterSection | Retrieves the document's footer section, if one exists. |
getFootnotes() | Footnote[] | Retrieves all the Footnote elements in the document body. |
getHeader() | HeaderSection | Retrieves the document's header section, if one exists. |
getId() | String | Retrieves the document's unique identifier. |
getName() | String | Retrieves the title of the document. |
getNamedRangeById(id) | NamedRange | Gets the NamedRange with the given ID. |
getNamedRanges() | NamedRange[] | Gets all NamedRange objects in the document. |
getNamedRanges(name) | NamedRange[] | Gets all NamedRange objects in the document with the given name. |
getSelection() | Range | Gets the user's selection in the active document. |
getUrl() | String | Retrieves the URL to access the current document. |
getViewers() | User[] | Gets the list of viewers and commenters for this Document . |
newPosition(element, offset) | Position | Creates a new Position , which is a reference to a location in the document,
relative to a specific element. |
newRange() | RangeBuilder | Creates a builder used to construct Range objects from document elements. |
removeEditor(emailAddress) | Document | Removes the given user from the list of editors for the Document . |
removeEditor(user) | Document | Removes the given user from the list of editors for the Document . |
removeViewer(emailAddress) | Document | Removes the given user from the list of viewers and commenters for the Document . |
removeViewer(user) | Document | Removes the given user from the list of viewers and commenters for the Document . |
saveAndClose() | void | Saves the current Document . |
setCursor(position) | Document | Sets the user's cursor in the active document, given a Position . |
setName(name) | Document | Sets the document title. |
setSelection(range) | Document | Sets the user's selection in the active document, given a Range . |
Class DocumentApp
Properties
Property | Type | Description |
---|---|---|
Attribute | Attribute | The Attribute enumeration. |
ElementType | ElementType | The ElementType enumeration. |
FontFamily | FontFamily | The FontFamily enumeration. |
GlyphType | GlyphType | The GlyphType enumeration. |
HorizontalAlignment | HorizontalAlignment | The HorizontalAlignment enumeration. |
ParagraphHeading | ParagraphHeading | The ParagraphHeading enumeration. |
TextAlignment | TextAlignment | The TextAlignment enumeration. |
VerticalAlignment | VerticalAlignment | The VerticalAlignment enumeration. |
Methods
Method | Return type | Brief description |
---|---|---|
create(name) | Document | Creates and returns a new document. |
getActiveDocument() | Document | Returns the document to which the script is container-bound. |
getUi() | Ui | Returns an instance of the document's user-interface environment that allows the script to add features like menus, dialogs, and sidebars. |
openById(id) | Document | Returns the document with the specified ID. |
openByUrl(url) | Document | Opens and returns the document with the specified URL. |
Class Element
Methods
Method | Return type | Brief description |
---|---|---|
asBody() | Body | Returns the current element as a Body . |
asEquation() | Equation | Returns the current element as a Equation . |
asEquationFunction() | EquationFunction | Returns the current element as a EquationFunction . |
asEquationFunctionArgumentSeparator() | EquationFunctionArgumentSeparator | Returns the current element as a
EquationFunctionArgumentSeparator . |
asEquationSymbol() | EquationSymbol | Returns the current element as a EquationSymbol . |
asFooterSection() | FooterSection | Returns the current element as a FooterSection . |
asFootnote() | Footnote | Returns the current element as a Footnote . |
asFootnoteSection() | FootnoteSection | Returns the current element as a FootnoteSection . |
asHeaderSection() | HeaderSection | Returns the current element as a HeaderSection . |
asHorizontalRule() | HorizontalRule | Returns the current element as a HorizontalRule . |
asInlineDrawing() | InlineDrawing | Returns the current element as a InlineDrawing . |
asInlineImage() | InlineImage | Returns the current element as a InlineImage . |
asListItem() | ListItem | Returns the current element as a ListItem . |
asPageBreak() | PageBreak | Returns the current element as a PageBreak . |
asParagraph() | Paragraph | Returns the current element as a Paragraph . |
asTable() | Table | Returns the current element as a Table . |
asTableCell() | TableCell | Returns the current element as a TableCell . |
asTableOfContents() | TableOfContents | Returns the current element as a TableOfContents . |
asTableRow() | TableRow | Returns the current element as a TableRow . |
asText() | Text | Returns the current element as a Text . |
copy() | Element | Returns a detached, deep copy of the current element. |
getAttributes() | Object | Retrieves the element's attributes. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getType() | ElementType | Retrieves the element's ElementType . |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
merge() | Element | Merges the element with the preceding sibling of the same type. |
removeFromParent() | Element | Removes the element from its parent. |
setAttributes(attributes) | Element | Sets the element's attributes. |
Class ElementType
Properties
Property | Type | Description |
---|---|---|
BODY_SECTION | Enum | The type corresponding to the
Body
element. |
COMMENT_SECTION | Enum | The type corresponding to the
element. |
DOCUMENT | Enum | The type that corresponds to the root of the document. |
EQUATION | Enum | The type corresponding to the
Equation
element. |
EQUATION_FUNCTION | Enum | The type corresponding to the
EquationFunction
element. |
EQUATION_FUNCTION_ARGUMENT_SEPARATOR | Enum | The type corresponding to the
EquationFunctionArgumentSeparator
element. |
EQUATION_SYMBOL | Enum | The type corresponding to the
EquationSymbol
element. |
FOOTER_SECTION | Enum | The type corresponding to the
FooterSection
element. |
FOOTNOTE | Enum | The type corresponding to the
Footnote
element. |
FOOTNOTE_SECTION | Enum | The type corresponding to the
FootnoteSection
element. |
HEADER_SECTION | Enum | The type corresponding to the
HeaderSection
element. |
HORIZONTAL_RULE | Enum | The type corresponding to the
HorizontalRule
element. |
INLINE_DRAWING | Enum | The type corresponding to the
InlineDrawing
element. |
INLINE_IMAGE | Enum | The type corresponding to the
InlineImage
element. |
LIST_ITEM | Enum | The type corresponding to the
ListItem
element. |
PAGE_BREAK | Enum | The type corresponding to the
PageBreak
element. |
PARAGRAPH | Enum | The type corresponding to the
Paragraph
element. |
TABLE | Enum | The type corresponding to the
Table
element. |
TABLE_CELL | Enum | The type corresponding to the
TableCell
element. |
TABLE_OF_CONTENTS | Enum | The type corresponding to the
TableOfContents
element. |
TABLE_ROW | Enum | The type corresponding to the
TableRow
element. |
TEXT | Enum | The type corresponding to the
Text element. |
UNSUPPORTED | Enum | The type corresponding to
UnsupportedElement . |
Class Equation
Methods
Method | Return type | Brief description |
---|---|---|
clear() | Equation | Clears the contents of the element. |
copy() | Equation | Returns a detached, deep copy of the current element. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findElement(elementType) | RangeElement | Searches the contents of the element for a descendant of the specified type. |
findElement(elementType, from) | RangeElement | Searches the contents of the element for a descendant of the specified
type, starting from the specified RangeElement . |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAttributes() | Object | Retrieves the element's attributes. |
getChild(childIndex) | Element | Retrieves the child element at the specified child index. |
getChildIndex(child) | Integer | Retrieves the child index for the specified child element. |
getLinkUrl() | String | Retrieves the link url. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getNumChildren() | Integer | Retrieves the number of children. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getType() | ElementType | Retrieves the element's ElementType . |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
merge() | Equation | Merges the element with the preceding sibling of the same type. |
removeFromParent() | Equation | Removes the element from its parent. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAttributes(attributes) | Equation | Sets the element's attributes. |
setLinkUrl(url) | Equation | Sets the link url. |
setTextAlignment(textAlignment) | Equation | Sets the text alignment. |
Class EquationFunction
Methods
Method | Return type | Brief description |
---|---|---|
clear() | EquationFunction | Clears the contents of the element. |
copy() | EquationFunction | Returns a detached, deep copy of the current element. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findElement(elementType) | RangeElement | Searches the contents of the element for a descendant of the specified type. |
findElement(elementType, from) | RangeElement | Searches the contents of the element for a descendant of the specified
type, starting from the specified RangeElement . |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAttributes() | Object | Retrieves the element's attributes. |
getChild(childIndex) | Element | Retrieves the child element at the specified child index. |
getChildIndex(child) | Integer | Retrieves the child index for the specified child element. |
getCode() | String | Retrieves the code corresponding to the equation function. |
getLinkUrl() | String | Retrieves the link url. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getNumChildren() | Integer | Retrieves the number of children. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getType() | ElementType | Retrieves the element's ElementType . |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
merge() | EquationFunction | Merges the element with the preceding sibling of the same type. |
removeFromParent() | EquationFunction | Removes the element from its parent. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAttributes(attributes) | EquationFunction | Sets the element's attributes. |
setLinkUrl(url) | EquationFunction | Sets the link url. |
setTextAlignment(textAlignment) | EquationFunction | Sets the text alignment. |
Class EquationFunctionArgumentSeparator
Methods
Method | Return type | Brief description |
---|---|---|
copy() | EquationFunctionArgumentSeparator | Returns a detached, deep copy of the current element. |
getAttributes() | Object | Retrieves the element's attributes. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getType() | ElementType | Retrieves the element's ElementType . |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
merge() | EquationFunctionArgumentSeparator | Merges the element with the preceding sibling of the same type. |
removeFromParent() | EquationFunctionArgumentSeparator | Removes the element from its parent. |
setAttributes(attributes) | EquationFunctionArgumentSeparator | Sets the element's attributes. |
Class EquationSymbol
Methods
Method | Return type | Brief description |
---|---|---|
copy() | EquationSymbol | Returns a detached, deep copy of the current element. |
getAttributes() | Object | Retrieves the element's attributes. |
getCode() | String | Retrieves the code corresponding to the equation symbol. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getType() | ElementType | Retrieves the element's ElementType . |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
merge() | EquationSymbol | Merges the element with the preceding sibling of the same type. |
removeFromParent() | EquationSymbol | Removes the element from its parent. |
setAttributes(attributes) | EquationSymbol | Sets the element's attributes. |
Class FontFamily
Properties
Property | Type | Description |
---|---|---|
AMARANTH | Enum | The Amaranth font family. |
ARIAL | Enum | The Arial font family. |
ARIAL_BLACK | Enum | The Arial Black font family. |
ARIAL_NARROW | Enum | The Arial Narrow font family. |
ARVO | Enum | The Arvo font family. |
CALIBRI | Enum | The Calibri font family. |
CAMBRIA | Enum | The Cambria font family. |
COMIC_SANS_MS | Enum | The Comic Sans MS font family. |
CONSOLAS | Enum | The Consolas font family. |
CORSIVA | Enum | The Corsiva font family. |
COURIER_NEW | Enum | The Courier New font family. |
DANCING_SCRIPT | Enum | The Dancing Script font family. |
DROID_SANS | Enum | The Droid Sans font family. |
DROID_SERIF | Enum | The Droid Serif font family. |
GARAMOND | Enum | The Garamond font family. |
GEORGIA | Enum | The Georgia font family. |
LOBSTER | Enum | The Lobster font family. |
MERRIWEATHER | Enum | The Merriweather font family. |
PHILOSOPHER | Enum | The Philosopher font family. |
QUATTROCENTO | Enum | The Quattrocento font family. |
SYNCOPATE | Enum | The Syncopate font family. |
TAHOMA | Enum | The Tahoma font family. |
TIMES_NEW_ROMAN | Enum | The Times New Roman font family. |
TREBUCHET_MS | Enum | The Trebuchet MS font family. |
UBUNTU | Enum | The Ubuntu font family. |
VERDANA | Enum | The Verdana font family. |
Class FooterSection
Methods
Method | Return type | Brief description |
---|---|---|
appendHorizontalRule() | HorizontalRule | Creates and appends a new HorizontalRule . |
appendImage(image) | InlineImage | Creates and appends a new InlineImage from the specified
image blob. |
appendImage(image) | InlineImage | Appends the given InlineImage . |
appendListItem(listItem) | ListItem | Appends the given ListItem . |
appendListItem(text) | ListItem | Creates and appends a new ListItem containing the specified text
contents. |
appendParagraph(paragraph) | Paragraph | Appends the given Paragraph . |
appendParagraph(text) | Paragraph | Creates and appends a new Paragraph containing the specified text
contents. |
appendTable() | Table | Creates and appends a new Table . |
appendTable(cells) | Table | Appends a new Table containing a TableCell for each
specified string value. |
appendTable(table) | Table | Appends the given Table . |
clear() | FooterSection | Clears the contents of the element. |
copy() | FooterSection | Returns a detached, deep copy of the current element. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findElement(elementType) | RangeElement | Searches the contents of the element for a descendant of the specified type. |
findElement(elementType, from) | RangeElement | Searches the contents of the element for a descendant of the specified
type, starting from the specified RangeElement . |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAttributes() | Object | Retrieves the element's attributes. |
getChild(childIndex) | Element | Retrieves the child element at the specified child index. |
getChildIndex(child) | Integer | Retrieves the child index for the specified child element. |
getImages() | InlineImage[] | Retrieves all the InlineImages contained in the section. |
getListItems() | ListItem[] | Retrieves all the ListItems contained in the section. |
getNumChildren() | Integer | Retrieves the number of children. |
getParagraphs() | Paragraph[] | Retrieves all the Paragraphs contained in the section. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getTables() | Table[] | Retrieves all the Tables contained in the section. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getType() | ElementType | Retrieves the element's ElementType . |
insertHorizontalRule(childIndex) | HorizontalRule | Creates and inserts a new HorizontalRule at the specified index. |
insertImage(childIndex, image) | InlineImage | Creates and inserts an InlineImage from the specified image blob,
at the specified index. |
insertImage(childIndex, image) | InlineImage | Inserts the given InlineImage at the specified index. |
insertListItem(childIndex, listItem) | ListItem | Inserts the given ListItem at the specified index. |
insertListItem(childIndex, text) | ListItem | Creates and inserts a new ListItem at the specified index,
containing the specified text contents. |
insertParagraph(childIndex, paragraph) | Paragraph | Inserts the given Paragraph at the specified index. |
insertParagraph(childIndex, text) | Paragraph | Creates and inserts a new Paragraph at the specified index,
containing the specified text contents. |
insertTable(childIndex) | Table | Creates and inserts a new Table at the specified index. |
insertTable(childIndex, cells) | Table | Creates and inserts a new Table containing the specified cells,
at the specified index. |
insertTable(childIndex, table) | Table | Inserts the given Table at the specified index. |
removeChild(child) | FooterSection | Removes the specified child element. |
removeFromParent() | FooterSection | Removes the element from its parent. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAttributes(attributes) | FooterSection | Sets the element's attributes. |
setText(text) | FooterSection | Sets the contents as plain text. |
setTextAlignment(textAlignment) | FooterSection | Sets the text alignment. |
Class Footnote
Methods
Method | Return type | Brief description |
---|---|---|
copy() | Footnote | Returns a detached, deep copy of the current element. |
getAttributes() | Object | Retrieves the element's attributes. |
getFootnoteContents() | FootnoteSection | Retrieves the contents of the footnote element. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getType() | ElementType | Retrieves the element's ElementType . |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
removeFromParent() | Footnote | Removes the element from its parent. |
setAttributes(attributes) | Footnote | Sets the element's attributes. |
Class FootnoteSection
Methods
Method | Return type | Brief description |
---|---|---|
appendParagraph(paragraph) | Paragraph | Appends the given Paragraph . |
appendParagraph(text) | Paragraph | Creates and appends a new Paragraph containing the specified text
contents. |
clear() | FootnoteSection | Clears the contents of the element. |
copy() | FootnoteSection | Returns a detached, deep copy of the current element. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findElement(elementType) | RangeElement | Searches the contents of the element for a descendant of the specified type. |
findElement(elementType, from) | RangeElement | Searches the contents of the element for a descendant of the specified
type, starting from the specified RangeElement . |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAttributes() | Object | Retrieves the element's attributes. |
getChild(childIndex) | Element | Retrieves the child element at the specified child index. |
getChildIndex(child) | Integer | Retrieves the child index for the specified child element. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getNumChildren() | Integer | Retrieves the number of children. |
getParagraphs() | Paragraph[] | Retrieves all the Paragraphs contained in the section. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getType() | ElementType | Retrieves the element's ElementType . |
insertParagraph(childIndex, paragraph) | Paragraph | Inserts the given Paragraph at the specified index. |
insertParagraph(childIndex, text) | Paragraph | Creates and inserts a new Paragraph at the specified index,
containing the specified text contents. |
removeChild(child) | FootnoteSection | Removes the specified child element. |
removeFromParent() | FootnoteSection | Removes the element from its parent. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAttributes(attributes) | FootnoteSection | Sets the element's attributes. |
setText(text) | FootnoteSection | Sets the contents as plain text. |
setTextAlignment(textAlignment) | FootnoteSection | Sets the text alignment. |
Class GlyphType
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. |
Class HeaderSection
Methods
Method | Return type | Brief description |
---|---|---|
appendHorizontalRule() | HorizontalRule | Creates and appends a new HorizontalRule . |
appendImage(image) | InlineImage | Creates and appends a new InlineImage from the specified
image blob. |
appendImage(image) | InlineImage | Appends the given InlineImage . |
appendListItem(listItem) | ListItem | Appends the given ListItem . |
appendListItem(text) | ListItem | Creates and appends a new ListItem containing the specified text
contents. |
appendParagraph(paragraph) | Paragraph | Appends the given Paragraph . |
appendParagraph(text) | Paragraph | Creates and appends a new Paragraph containing the specified text
contents. |
appendTable() | Table | Creates and appends a new Table . |
appendTable(cells) | Table | Appends a new Table containing a TableCell for each
specified string value. |
appendTable(table) | Table | Appends the given Table . |
clear() | HeaderSection | Clears the contents of the element. |
copy() | HeaderSection | Returns a detached, deep copy of the current element. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findElement(elementType) | RangeElement | Searches the contents of the element for a descendant of the specified type. |
findElement(elementType, from) | RangeElement | Searches the contents of the element for a descendant of the specified
type, starting from the specified RangeElement . |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAttributes() | Object | Retrieves the element's attributes. |
getChild(childIndex) | Element | Retrieves the child element at the specified child index. |
getChildIndex(child) | Integer | Retrieves the child index for the specified child element. |
getImages() | InlineImage[] | Retrieves all the InlineImages contained in the section. |
getListItems() | ListItem[] | Retrieves all the ListItems contained in the section. |
getNumChildren() | Integer | Retrieves the number of children. |
getParagraphs() | Paragraph[] | Retrieves all the Paragraphs contained in the section. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getTables() | Table[] | Retrieves all the Tables contained in the section. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getType() | ElementType | Retrieves the element's ElementType . |
insertHorizontalRule(childIndex) | HorizontalRule | Creates and inserts a new HorizontalRule at the specified index. |
insertImage(childIndex, image) | InlineImage | Creates and inserts an InlineImage from the specified image blob,
at the specified index. |
insertImage(childIndex, image) | InlineImage | Inserts the given InlineImage at the specified index. |
insertListItem(childIndex, listItem) | ListItem | Inserts the given ListItem at the specified index. |
insertListItem(childIndex, text) | ListItem | Creates and inserts a new ListItem at the specified index,
containing the specified text contents. |
insertParagraph(childIndex, paragraph) | Paragraph | Inserts the given Paragraph at the specified index. |
insertParagraph(childIndex, text) | Paragraph | Creates and inserts a new Paragraph at the specified index,
containing the specified text contents. |
insertTable(childIndex) | Table | Creates and inserts a new Table at the specified index. |
insertTable(childIndex, cells) | Table | Creates and inserts a new Table containing the specified cells,
at the specified index. |
insertTable(childIndex, table) | Table | Inserts the given Table at the specified index. |
removeChild(child) | HeaderSection | Removes the specified child element. |
removeFromParent() | HeaderSection | Removes the element from its parent. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAttributes(attributes) | HeaderSection | Sets the element's attributes. |
setText(text) | HeaderSection | Sets the contents as plain text. |
setTextAlignment(textAlignment) | HeaderSection | Sets the text alignment. |
Class HorizontalAlignment
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. |
Class HorizontalRule
Methods
Method | Return type | Brief description |
---|---|---|
copy() | HorizontalRule | Returns a detached, deep copy of the current element. |
getAttributes() | Object | Retrieves the element's attributes. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getType() | ElementType | Retrieves the element's ElementType . |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
removeFromParent() | HorizontalRule | Removes the element from its parent. |
setAttributes(attributes) | HorizontalRule | Sets the element's attributes. |
Class InlineDrawing
Methods
Method | Return type | Brief description |
---|---|---|
copy() | InlineDrawing | Returns a detached, deep copy of the current element. |
getAttributes() | Object | Retrieves the element's attributes. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getType() | ElementType | Retrieves the element's ElementType . |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
merge() | InlineDrawing | Merges the element with the preceding sibling of the same type. |
removeFromParent() | InlineDrawing | Removes the element from its parent. |
setAttributes(attributes) | InlineDrawing | Sets the element's attributes. |
Class InlineImage
Methods
Method | Return type | Brief description |
---|---|---|
copy() | InlineImage | Returns a detached, deep copy of the current element. |
getAs(contentType) | Blob | Return the data inside this object as a blob converted to the specified content type. |
getAttributes() | Object | Retrieves the element's attributes. |
getBlob() | Blob | Return the data inside this object as a blob. |
getHeight() | Integer | Retrieves the image's height, in pixels. |
getLinkUrl() | String | Retrieves the link URL. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getType() | ElementType | Retrieves the element's ElementType . |
getWidth() | Integer | Retrieves the image's width, in pixels. |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
merge() | InlineImage | Merges the element with the preceding sibling of the same type. |
removeFromParent() | InlineImage | Removes the element from its parent. |
setAttributes(attributes) | InlineImage | Sets the element's attributes. |
setHeight(height) | InlineImage | Sets the image's height, in pixels. |
setLinkUrl(url) | InlineImage | Sets the link URL. |
setWidth(width) | InlineImage | Sets the image's width, in pixels. |
Class ListItem
Methods
Method | Return type | Brief description |
---|---|---|
appendHorizontalRule() | HorizontalRule | Creates and appends a new HorizontalRule . |
appendInlineImage(image) | InlineImage | Creates and appends a new InlineImage from the specified image
blob. |
appendInlineImage(image) | InlineImage | Appends the given InlineImage . |
appendPageBreak() | PageBreak | Creates and appends a new PageBreak . |
appendPageBreak(pageBreak) | PageBreak | Appends the given PageBreak . |
appendText(text) | Text | Creates and appends a new Text element with the specified
contents. |
appendText(text) | Text | Appends the given Text element. |
clear() | ListItem | Clears the contents of the element. |
copy() | ListItem | Returns a detached, deep copy of the current element. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findElement(elementType) | RangeElement | Searches the contents of the element for a descendant of the specified type. |
findElement(elementType, from) | RangeElement | Searches the contents of the element for a descendant of the specified
type, starting from the specified RangeElement . |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAlignment() | HorizontalAlignment | Retrieves the HorizontalAlignment . |
getAttributes() | Object | Retrieves the element's attributes. |
getChild(childIndex) | Element | Retrieves the child element at the specified child index. |
getChildIndex(child) | Integer | Retrieves the child index for the specified child element. |
getGlyphType() | GlyphType | Retrieves the list item's GlyphType . |
getHeading() | ParagraphHeading | Retrieves the ParagraphHeading . |
getIndentEnd() | Number | Retrieves the end indentation, in points. |
getIndentFirstLine() | Number | Retrieves the first line indentation, in points. |
getIndentStart() | Number | Retrieves the start indentation. |
getLineSpacing() | Number | Retrieves the line spacing, in points. |
getLinkUrl() | String | Retrieves the link url. |
getListId() | String | Retrieves the list ID. |
getNestingLevel() | Integer | Retrieves the list item's nesting level. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getNumChildren() | Integer | Retrieves the number of children. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getSpacingAfter() | Number | Retrieves the spacing after the element, in points. |
getSpacingBefore() | Number | Retrieves the spacing before the element, in points. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getType() | ElementType | Retrieves the element's ElementType . |
insertHorizontalRule(childIndex) | HorizontalRule | Creates and inserts a HorizontalRule at the specified index. |
insertInlineImage(childIndex, image) | InlineImage | Creates and inserts a new InlineImage from the specified image
blob, at the specified index. |
insertInlineImage(childIndex, image) | InlineImage | Inserts the given InlineImage at the specified index. |
insertPageBreak(childIndex) | PageBreak | Creates and inserts a new PageBreak at the specified index. |
insertPageBreak(childIndex, pageBreak) | PageBreak | Inserts the given PageBreak at the specified index. |
insertText(childIndex, text) | Text | Creates and inserts a new text element at the specified index. |
insertText(childIndex, text) | Text | Inserts the given Text element at the specified index, with the
specified text contents. |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
isLeftToRight() | Boolean | Retrieves the left-to-right setting. |
merge() | ListItem | Merges the element with the preceding sibling of the same type. |
removeChild(child) | ListItem | Removes the specified child element. |
removeFromParent() | ListItem | Removes the element from its parent. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAlignment(alignment) | ListItem | Sets the HorizontalAlignment . |
setAttributes(attributes) | ListItem | Sets the element's attributes. |
setGlyphType(glyphType) | ListItem | Sets the list item's GlyphType . |
setHeading(heading) | ListItem | Sets the ParagraphHeading . |
setIndentEnd(indentEnd) | ListItem | Sets the end indentation, in points. |
setIndentFirstLine(indentFirstLine) | ListItem | Sets the first line indentation, in points. |
setIndentStart(indentStart) | ListItem | Sets the start indentation, in points. |
setLeftToRight(leftToRight) | ListItem | Sets the left-to-right setting. |
setLineSpacing(multiplier) | ListItem | Sets the line spacing, as a quantity indicating the number of lines to use for spacing. |
setLinkUrl(url) | ListItem | Sets the link url. |
setListId(listItem) | ListItem | Sets the list ID. |
setNestingLevel(nestingLevel) | ListItem | Sets the list item's nesting level. |
setSpacingAfter(spacingAfter) | ListItem | Sets the spacing after the element, in points. |
setSpacingBefore(spacingBefore) | ListItem | Sets the spacing before the element, in points. |
setText(text) | void | Sets the contents of the list item as text. |
setTextAlignment(textAlignment) | ListItem | Sets the text alignment. |
Class NamedRange
Methods
Method | Return type | Brief description |
---|---|---|
getId() | String | Gets the ID of this NamedRange . |
getName() | String | Gets the name of this NamedRange . |
getRange() | Range | Gets the range of elements associated with this NamedRange . |
remove() | void | Removes this NamedRange from the document. |
Class PageBreak
Methods
Method | Return type | Brief description |
---|---|---|
copy() | PageBreak | Returns a detached, deep copy of the current element. |
getAttributes() | Object | Retrieves the element's attributes. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getType() | ElementType | Retrieves the element's ElementType . |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
removeFromParent() | PageBreak | Removes the element from its parent. |
setAttributes(attributes) | PageBreak | Sets the element's attributes. |
Class Paragraph
Methods
Method | Return type | Brief description |
---|---|---|
appendHorizontalRule() | HorizontalRule | Creates and appends a new HorizontalRule . |
appendInlineImage(image) | InlineImage | Creates and appends a new InlineImage from the specified image
blob. |
appendInlineImage(image) | InlineImage | Appends the given InlineImage . |
appendPageBreak() | PageBreak | Creates and appends a new PageBreak . |
appendPageBreak(pageBreak) | PageBreak | Appends the given PageBreak . |
appendText(text) | Text | Creates and appends a new Text element with the specified
contents. |
appendText(text) | Text | Appends the given Text element. |
clear() | Paragraph | Clears the contents of the element. |
copy() | Paragraph | Returns a detached, deep copy of the current element. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findElement(elementType) | RangeElement | Searches the contents of the element for a descendant of the specified type. |
findElement(elementType, from) | RangeElement | Searches the contents of the element for a descendant of the specified
type, starting from the specified RangeElement . |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAlignment() | HorizontalAlignment | Retrieves the HorizontalAlignment . |
getAttributes() | Object | Retrieves the element's attributes. |
getChild(childIndex) | Element | Retrieves the child element at the specified child index. |
getChildIndex(child) | Integer | Retrieves the child index for the specified child element. |
getHeading() | ParagraphHeading | Retrieves the ParagraphHeading . |
getIndentEnd() | Number | Retrieves the end indentation, in points. |
getIndentFirstLine() | Number | Retrieves the first line indentation, in points. |
getIndentStart() | Number | Retrieves the start indentation. |
getLineSpacing() | Number | Retrieves the line spacing, in points. |
getLinkUrl() | String | Retrieves the link url. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getNumChildren() | Integer | Retrieves the number of children. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getSpacingAfter() | Number | Retrieves the spacing after the element, in points. |
getSpacingBefore() | Number | Retrieves the spacing before the element, in points. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getType() | ElementType | Retrieves the element's ElementType . |
insertHorizontalRule(childIndex) | HorizontalRule | Creates and inserts a HorizontalRule at the specified index. |
insertInlineImage(childIndex, image) | InlineImage | Creates and inserts a new InlineImage from the specified image
blob, at the specified index. |
insertInlineImage(childIndex, image) | InlineImage | Inserts the given InlineImage at the specified index. |
insertPageBreak(childIndex) | PageBreak | Creates and inserts a new PageBreak at the specified index. |
insertPageBreak(childIndex, pageBreak) | PageBreak | Inserts the given PageBreak at the specified index. |
insertText(childIndex, text) | Text | Creates and inserts a new text element at the specified index. |
insertText(childIndex, text) | Text | Inserts the given Text element at the specified index, with the
specified text contents. |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
isLeftToRight() | Boolean | Retrieves the left-to-right setting. |
merge() | Paragraph | Merges the element with the preceding sibling of the same type. |
removeChild(child) | Paragraph | Removes the specified child element. |
removeFromParent() | Paragraph | Removes the element from its parent. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAlignment(alignment) | Paragraph | Sets the HorizontalAlignment . |
setAttributes(attributes) | Paragraph | Sets the element's attributes. |
setHeading(heading) | Paragraph | Sets the ParagraphHeading . |
setIndentEnd(indentEnd) | Paragraph | Sets the end indentation, in points. |
setIndentFirstLine(indentFirstLine) | Paragraph | Sets the first line indentation, in points. |
setIndentStart(indentStart) | Paragraph | Sets the start indentation, in points. |
setLeftToRight(leftToRight) | Paragraph | Sets the left-to-right setting. |
setLineSpacing(multiplier) | Paragraph | Sets the line spacing, as a quantity indicating the number of lines to use for spacing. |
setLinkUrl(url) | Paragraph | Sets the link url. |
setSpacingAfter(spacingAfter) | Paragraph | Sets the spacing after the element, in points. |
setSpacingBefore(spacingBefore) | Paragraph | Sets the spacing before the element, in points. |
setText(text) | void | Sets the contents of the paragraph as text. |
setTextAlignment(textAlignment) | Paragraph | Sets the text alignment. |
Class ParagraphHeading
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. |
Class Position
Methods
Method | Return type | Brief description |
---|---|---|
getElement() | Element | Gets the element that contains this Position . |
getOffset() | Integer | Gets this Position 's relative location within the element that contains it. |
getSurroundingText() | Text | Creates an artificial Text element that represents the text and formatting of the
Paragraph or
ListItem that contains the
Position , either directly or through a chain of child elements. |
getSurroundingTextOffset() | Integer | Gets the offset of this Position within the Text element returned by
getSurroundingText() . |
insertBookmark() | Bookmark | Creates and inserts a new Bookmark at this Position . |
insertInlineImage(image) | InlineImage | Creates and inserts a new InlineImage at this Position from the specified image
blob. |
insertText(text) | Text | Inserts the specified text at this Position . |
Class Range
Methods
Method | Return type | Brief description |
---|---|---|
getRangeElements() | RangeElement[] | 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). |
Class RangeBuilder
Methods
Method | Return type | Brief description |
---|---|---|
addElement(element) | RangeBuilder | Adds an entire Element to this RangeBuilder . |
addElement(textElement, startOffset, endOffsetInclusive) | RangeBuilder | Adds a partial Text element to this RangeBuilder . |
addElementsBetween(startElement, endElementInclusive) | RangeBuilder | Adds two entire elements, and all elements between them, to this RangeBuilder . |
addElementsBetween(startTextElement, startOffset, endTextElementInclusive, endOffsetInclusive) | RangeBuilder | Adds two partial Text elements, and all elements between them, to the
RangeBuilder . |
addRange(range) | RangeBuilder | Adds the contents of another RangeBuilder to this RangeBuilder . |
build() | Range | Constructs a RangeBuilder from the settings applied to the builder. |
getRangeElements() | RangeElement[] | 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). |
Class RangeElement
Methods
Method | Return type | Brief description |
---|---|---|
getElement() | Element | Gets the Element that corresponds to this RangeElement . |
getEndOffsetInclusive() | Integer | Gets the position of the end of a partial range within the range element. |
getStartOffset() | Integer | Gets the position of the start of a partial range within the range element. |
isPartial() | Boolean | Determines whether this range element covers the entire element or a partial selection of the element's characters. |
Class Table
Methods
Method | Return type | Brief description |
---|---|---|
appendTableRow() | TableRow | Creates and appends a new TableRow . |
appendTableRow(tableRow) | TableRow | Appends the given TableRow . |
clear() | Table | Clears the contents of the element. |
copy() | Table | Returns a detached, deep copy of the current element. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findElement(elementType) | RangeElement | Searches the contents of the element for a descendant of the specified type. |
findElement(elementType, from) | RangeElement | Searches the contents of the element for a descendant of the specified
type, starting from the specified RangeElement . |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAttributes() | Object | Retrieves the element's attributes. |
getBorderColor() | String | Retrieves the border color. |
getBorderWidth() | Number | Retrieves the border width, in points. |
getCell(rowIndex, cellIndex) | TableCell | Retrieves the TableCell at the specified row and cell indices. |
getChild(childIndex) | Element | Retrieves the child element at the specified child index. |
getChildIndex(child) | Integer | Retrieves the child index for the specified child element. |
getColumnWidth(columnIndex) | Number | Retrieves the width of the specified table column, in points. |
getLinkUrl() | String | Retrieves the link url. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getNumChildren() | Integer | Retrieves the number of children. |
getNumRows() | Integer | Retrieves the number of TableRows . |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getRow(rowIndex) | TableRow | Retrieves the TableRow at the specified row index. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getType() | ElementType | Retrieves the element's ElementType . |
insertTableRow(childIndex) | TableRow | Creates and inserts a new TableRow at the specified index. |
insertTableRow(childIndex, tableRow) | TableRow | Inserts the given TableRow at the specified index. |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
removeChild(child) | Table | Removes the specified child element. |
removeFromParent() | Table | Removes the element from its parent. |
removeRow(rowIndex) | TableRow | Removes the TableRow at the specified row index. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAttributes(attributes) | Table | Sets the element's attributes. |
setBorderColor(color) | Table | Sets the border color. |
setBorderWidth(width) | Table | Sets the border width, in points. |
setColumnWidth(columnIndex, width) | Table | Sets the width of the specified column, in points. |
setLinkUrl(url) | Table | Sets the link url. |
setTextAlignment(textAlignment) | Table | Sets the text alignment. |
Class TableCell
Methods
Method | Return type | Brief description |
---|---|---|
appendHorizontalRule() | HorizontalRule | Creates and appends a new HorizontalRule . |
appendImage(image) | InlineImage | Creates and appends a new InlineImage from the specified image
blob. |
appendImage(image) | InlineImage | Appends the given InlineImage . |
appendListItem(listItem) | ListItem | Appends the given ListItem . |
appendListItem(text) | ListItem | Creates and appends a new ListItem . |
appendParagraph(paragraph) | Paragraph | Appends the given Paragraph . |
appendParagraph(text) | Paragraph | Creates and appends a new Paragraph . |
appendTable() | Table | Creates and appends a new Table . |
appendTable(cells) | Table | Appends a new Table containing the specified cells. |
appendTable(table) | Table | Appends the given Table . |
clear() | TableCell | Clears the contents of the element. |
copy() | TableCell | Returns a detached, deep copy of the current element. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findElement(elementType) | RangeElement | Searches the contents of the element for a descendant of the specified type. |
findElement(elementType, from) | RangeElement | Searches the contents of the element for a descendant of the specified
type, starting from the specified RangeElement . |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAttributes() | Object | Retrieves the element's attributes. |
getBackgroundColor() | String | Retrieves the background color. |
getChild(childIndex) | Element | Retrieves the child element at the specified child index. |
getChildIndex(child) | Integer | Retrieves the child index for the specified child element. |
getLinkUrl() | String | Retrieves the link url. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getNumChildren() | Integer | Retrieves the number of children. |
getPaddingBottom() | Number | Retrieves the bottom padding, in points. |
getPaddingLeft() | Number | Retrieves the left padding, in points. |
getPaddingRight() | Number | Retrieves the right padding, in points. |
getPaddingTop() | Number | Retrieves the top padding, in points. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getParentRow() | TableRow | Retrieves the TableRow containing the current TableCell . |
getParentTable() | Table | Retrieves the Table containing the current TableCell . |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getType() | ElementType | Retrieves the element's ElementType . |
getVerticalAlignment() | VerticalAlignment | Retrieves the VerticalAlignment . |
getWidth() | Number | Retrieves the width of the column containing the cell, in points. |
insertHorizontalRule(childIndex) | HorizontalRule | Creates and inserts a new HorizontalRule at the specified index. |
insertImage(childIndex, image) | InlineImage | Creates and inserts an InlineImage from the specified image blob,
at the specified index. |
insertImage(childIndex, image) | InlineImage | Inserts the given InlineImage at the specified index. |
insertListItem(childIndex, listItem) | ListItem | Inserts the given ListItem at the specified index. |
insertListItem(childIndex, text) | ListItem | Creates and inserts a new ListItem at the specified index. |
insertParagraph(childIndex, paragraph) | Paragraph | Inserts the given Paragraph at the specified index. |
insertParagraph(childIndex, text) | Paragraph | Creates and inserts a new Paragraph at the specified index. |
insertTable(childIndex) | Table | Creates and inserts a new Table at the specified index. |
insertTable(childIndex, cells) | Table | Creates and inserts a new Table containing the specified cells,
at the specified index. |
insertTable(childIndex, table) | Table | Inserts the given Table at the specified index. |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
merge() | TableCell | Merges the element with the preceding sibling of the same type. |
removeChild(child) | TableCell | Removes the specified child element. |
removeFromParent() | TableCell | Removes the element from its parent. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAttributes(attributes) | TableCell | Sets the element's attributes. |
setBackgroundColor(color) | TableCell | Sets the background color. |
setLinkUrl(url) | TableCell | Sets the link url. |
setPaddingBottom(paddingBottom) | TableCell | Sets the bottom padding, in points. |
setPaddingLeft(paddingLeft) | TableCell | Sets the left padding, in points. |
setPaddingRight(paddingTop) | TableCell | Sets the right padding, in points. |
setPaddingTop(paddingTop) | TableCell | Sets the top padding, in points. |
setText(text) | TableCell | Sets the contents as plain text. |
setTextAlignment(textAlignment) | TableCell | Sets the text alignment. |
setVerticalAlignment(alignment) | TableCell | Sets the vertical alignment. |
setWidth(width) | TableCell | Sets the width of the column containing the current cell, in points. |
Class TableOfContents
Methods
Method | Return type | Brief description |
---|---|---|
clear() | TableOfContents | Clears the contents of the element. |
copy() | TableOfContents | Returns a detached, deep copy of the current element. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findElement(elementType) | RangeElement | Searches the contents of the element for a descendant of the specified type. |
findElement(elementType, from) | RangeElement | Searches the contents of the element for a descendant of the specified
type, starting from the specified RangeElement . |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAttributes() | Object | Retrieves the element's attributes. |
getChild(childIndex) | Element | Retrieves the child element at the specified child index. |
getChildIndex(child) | Integer | Retrieves the child index for the specified child element. |
getLinkUrl() | String | Retrieves the link url. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getNumChildren() | Integer | Retrieves the number of children. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getType() | ElementType | Retrieves the element's ElementType . |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
removeFromParent() | TableOfContents | Removes the element from its parent. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAttributes(attributes) | TableOfContents | Sets the element's attributes. |
setLinkUrl(url) | TableOfContents | Sets the link url. |
setTextAlignment(textAlignment) | TableOfContents | Sets the text alignment. |
Class TableRow
Methods
Method | Return type | Brief description |
---|---|---|
appendTableCell() | TableCell | Creates and appends a new TableCell . |
appendTableCell(textContents) | TableCell | Appends the given TableCell containing the specified text. |
appendTableCell(tableCell) | TableCell | Appends the given TableCell . |
clear() | TableRow | Clears the contents of the element. |
copy() | TableRow | Returns a detached, deep copy of the current element. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findElement(elementType) | RangeElement | Searches the contents of the element for a descendant of the specified type. |
findElement(elementType, from) | RangeElement | Searches the contents of the element for a descendant of the specified
type, starting from the specified RangeElement . |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAttributes() | Object | Retrieves the element's attributes. |
getCell(cellIndex) | TableCell | Retrieves the TableCell at the specified cell index. |
getChild(childIndex) | Element | Retrieves the child element at the specified child index. |
getChildIndex(child) | Integer | Retrieves the child index for the specified child element. |
getLinkUrl() | String | Retrieves the link url. |
getMinimumHeight() | Integer | Retrieves the minimum height, in points. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getNumCells() | Integer | Retrieves the number of cells in the row. |
getNumChildren() | Integer | Retrieves the number of children. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getParentTable() | Table | Retrieves the Table containing the current row. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getType() | ElementType | Retrieves the element's ElementType . |
insertTableCell(childIndex) | TableCell | Creates and inserts a new TableCell at the specified index. |
insertTableCell(childIndex, textContents) | TableCell | Inserts the given TableCell at the specified index, containing the
given text. |
insertTableCell(childIndex, tableCell) | TableCell | Inserts the given TableCell at the specified index. |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
merge() | TableRow | Merges the element with the preceding sibling of the same type. |
removeCell(cellIndex) | TableCell | Removes the TableCell at the specified cell index. |
removeChild(child) | TableRow | Removes the specified child element. |
removeFromParent() | TableRow | Removes the element from its parent. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAttributes(attributes) | TableRow | Sets the element's attributes. |
setLinkUrl(url) | TableRow | Sets the link url. |
setMinimumHeight(minHeight) | TableRow | Sets the minimum height, in points. |
setTextAlignment(textAlignment) | TableRow | Sets the text alignment. |
Class Text
Methods
Method | Return type | Brief description |
---|---|---|
appendText(text) | Text | Appends the specified text at the given character offset. |
copy() | Text | Returns a detached, deep copy of the current element. |
deleteText(startOffset, endOffsetInclusive) | Text | Deletes a range of text. |
editAsText() | Text | Obtains a Text version of the current element, for editing. |
findText(searchPattern) | RangeElement | Searches the contents of the element for the specified text pattern using regular expressions. |
findText(searchPattern, from) | RangeElement | Searches the contents of the element for the specified text pattern, starting from a given search result. |
getAttributes() | Object | Retrieves the element's attributes. |
getAttributes(offset) | Object | Retrieves the attributes at the specified character offset. |
getBackgroundColor() | String | Retrieves the background color setting. |
getBackgroundColor(offset) | String | Retrieves the background color at the specified character offset. |
getFontFamily() | FontFamily | Retrieves the font family setting. |
getFontFamily(offset) | FontFamily | Retrieves the font family at the specified character offset. |
getFontSize() | Integer | Retrieves the font size setting. |
getFontSize(offset) | Integer | Retrieves the font size at the specified character offset. |
getForegroundColor() | String | Retrieves the foreground color setting. |
getForegroundColor(offset) | String | Retrieves the foreground color at the specified character offset. |
getLinkUrl() | String | Retrieves the link url. |
getLinkUrl(offset) | String | Retrieves the link url at the specified character offset. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getText() | String | Retrieves the contents of the element as a text string. |
getTextAlignment() | TextAlignment | Gets the text alignment. |
getTextAlignment(offset) | TextAlignment | Gets the text alignment for a single character. |
getTextAttributeIndices() | Integer[] | Retrieves the set of text indices that correspond to the start of distinct text formatting runs. |
getType() | ElementType | Retrieves the element's ElementType . |
insertText(offset, text) | Text | Inserts the specified text at the given character offset. |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
isBold() | Boolean | Retrieves the bold setting. |
isBold(offset) | Boolean | Retrieves the bold setting at the specified character offset. |
isItalic() | Boolean | Retrieves the italic setting. |
isItalic(offset) | Boolean | Retrieves the italic setting at the specified character offset. |
isStrikethrough() | Boolean | Retrieves the strikethrough setting. |
isStrikethrough(offset) | Boolean | Retrieves the strikethrough setting at the specified character offset. |
isUnderline() | Boolean | Retrieves the underline setting. |
isUnderline(offset) | Boolean | Retrieves the underline setting at the specified character offset. |
merge() | Text | Merges the element with the preceding sibling of the same type. |
removeFromParent() | Text | Removes the element from its parent. |
replaceText(searchPattern, replacement) | Element | Replaces all occurrences of a given text pattern with a given replacement string, using regular expressions. |
setAttributes(startOffset, endOffsetInclusive, attributes) | Text | Applies the specified attributes to the given character range. |
setAttributes(attributes) | Text | Sets the element's attributes. |
setBackgroundColor(startOffset, endOffsetInclusive, color) | Text | Sets the background color for the specified character range. |
setBackgroundColor(color) | Text | Sets the background color. |
setBold(bold) | Text | Sets the bold setting. |
setBold(startOffset, endOffsetInclusive, bold) | Text | Sets the bold setting for the specified character range. |
setFontFamily(family) | Text | Sets the font family. |
setFontFamily(startOffset, endOffsetInclusive, family) | Text | Sets the font family for the specified character range. |
setFontSize(size) | Text | Sets the font size. |
setFontSize(startOffset, endOffsetInclusive, size) | Text | Sets the font size for the specified character range. |
setForegroundColor(startOffset, endOffsetInclusive, color) | Text | Sets the foreground color for the specified character range. |
setForegroundColor(color) | Text | Sets the foreground color. |
setItalic(italic) | Text | Sets the italic setting. |
setItalic(startOffset, endOffsetInclusive, italic) | Text | Sets the italic setting for the specified character range. |
setLinkUrl(startOffset, endOffsetInclusive, url) | Text | Sets the link url for the specified character range. |
setLinkUrl(url) | Text | Sets the link url. |
setStrikethrough(strikethrough) | Text | Sets the strikethrough setting. |
setStrikethrough(startOffset, endOffsetInclusive, strikethrough) | Text | Sets the strikethrough setting for the specified character range. |
setText(text) | Text | Sets the text contents. |
setTextAlignment(startOffset, endOffsetInclusive, textAlignment) | Text | Sets the text alignment for a given character range. |
setTextAlignment(textAlignment) | Text | Sets the text alignment. |
setUnderline(underline) | Text | Sets the underline setting. |
setUnderline(startOffset, endOffsetInclusive, underline) | Text | Sets the underline setting for the specified character range. |
Class TextAlignment
Properties
Property | Type | Description |
---|---|---|
NORMAL | Enum | The normal text alignment. |
SUPERSCRIPT | Enum | The superscript text alignment. |
SUBSCRIPT | Enum | The subscript text alignment. |
Class UnsupportedElement
Methods
Method | Return type | Brief description |
---|---|---|
copy() | UnsupportedElement | Returns a detached, deep copy of the current element. |
getAttributes() | Object | Retrieves the element's attributes. |
getNextSibling() | Element | Retrieves the element's next sibling element. |
getParent() | ContainerElement | Retrieves the element's parent element. |
getPreviousSibling() | Element | Retrieves the element's previous sibling element. |
getType() | ElementType | Retrieves the element's ElementType . |
isAtDocumentEnd() | Boolean | Determines whether the element is at the end of the
Document . |
merge() | UnsupportedElement | Merges the element with the preceding sibling of the same type. |
removeFromParent() | UnsupportedElement | Removes the element from its parent. |
setAttributes(attributes) | UnsupportedElement | Sets the element's attributes. |
Class VerticalAlignment
Properties
Property | Type | Description |
---|---|---|
BOTTOM | Enum | The bottom-alignment option. |
CENTER | Enum | The center-alignment option. |
TOP | Enum | The top-alignment option. |