> ## Documentation Index
> Fetch the complete documentation index at: https://developers.myhero.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Read document text

> Read a document as plain text: a HERO editor document (with its clause numbering and headings), a PDF (the server extracts its text; it is the only way to…

`read_document_text`

Read a document as plain text: a HERO editor document (with its clause numbering and headings), a PDF (the server extracts its text; it is the only way to read one), or a file attached to this chat message (attachmentFilename). Pass `section` to read one clause and what sits under it instead of the whole document. Returns at most 40000 characters per call with a `page` object (\{offset, returned, total, nextOffset?}). Paged: when the result's page.nextOffset is present, more remains — pass page.nextOffset as `offset` to continue.

## Parameters

**documentId** `string`

The document ID. Falls back to context documentId if omitted.

**section** `string`

A clause number, e.g. "2.2" or "22", to read just that clause.

**attachmentFilename** `string`

Filename of a file attached to this chat message, to page through its text.

**offset** `integer`

Character to start at. Pass the previous result's page.nextOffset. Minimum: 0.

**limit** `integer`

Max characters to return (default and max 40000). Minimum: 1. Maximum: 40000.

**maxLength** `integer`

Deprecated alias for limit. Minimum: 1.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.