Skip to main content

storage.getDocument()

Reads bounded text, JSON, XML, or PDF/DOCX text from Storage. PDF/DOCX extraction is text-only, capped at 40,000 characters and 100 PDF pages, with explicit extraction/truncation and possible-OCR metadata. Source input is limited to 10 MiB; use getFileData for XLSX or record-oriented files. format: 'text' is the default and supports optional byte ranges. For text line windows pass startLine/endLine/maxChars; the result contains line metadata instead of byte offsets. Do not mix line and byte ranges. format: 'json' returns document from JSON.parse; format: 'xml' returns an order-preserving XML representation. format: 'auto' selects JSON/XML from the stored MIME type or file extension.

Overloads

Example

See all storage methods or runtime basics.
Last modified on November 8, 2026