
Indexes are measured in UTF-16 code units. The indexes of theĮlements within a segment are relative to the beginning of that segment. A segment is the body, header, footer, orįootnote containing structural or content elements. These indicate the offset of an element's beginning andĮnd, relative to the beginning of its enclosing segment. Most elements within the body content have the startIndex andĮndIndex properties. Well as the use of start and end indexes as described in the following section. In the output you can see many of the key structural and content elements, as Sample dump of a document in JSON format. A set of content element types personalizes its own ParagraphElement, as shown in the following diagram:įor an example of a complete document structure, see the That works something like a StructuralElement. Paragraphs contain a special type of element called a Have content elements that also contain a sequence of structural The structural elements and their content objects contain all the document's A content element personalizes each StructuralElement object, Most of the items you can, or would likely want to, use programmatically Which you can use as a basis for generating new documents programmatically.

To manipulate global document features outside of the bodyĬontent, it's almost always better to use one or more document templates, ForĪ complete representation of the document structure, consider using the

Throughout this guide, we present a minimalist view The top-level elements of a document include the body and several other This guide describes the internal structure of a Google Docs document: theĮlements that make up a document and the relationship between them.
