Import surface
import {
get_document,
get_document_structure,
get_semantic_document_structure,
get_page_content,
get_page_render,
get_page_ocr,
} from "@echofiles/echo-pdf/local"
The local package API is intentionally small. These six primitives are the core surface that downstream local agents and apps should build around.
| Primitive | Returns | Writes | Primary use |
|---|---|---|---|
get_document | document metadata | document.json | source snapshot and document root |
get_document_structure | stable page index | structure.json | iterate pages and locate page artifacts |
get_semantic_document_structure | heading / section tree | semantic-structure.json | chapter navigation without mutating pages[] |
get_page_content | page text artifact | pages/<page>.json | page retrieval and semantic input |
get_page_render | render metadata | renders/<page>.json + PNG | visual page reuse |
get_page_ocr | OCR metadata | ocr/<page>.json | text recovery over rendered image input |
import {
get_document,
get_document_structure,
get_semantic_document_structure,
get_page_content,
get_page_render,
get_page_ocr,
} from "@echofiles/echo-pdf/local"
>=20exports aware consumerThis reference is intentionally centered on six core primitives. Compatibility surfaces may remain elsewhere in the repo, but they are not the main API story of the local-first product.