EPecho-pdf docs
API

Six local primitives, one product surface.

The local package API is intentionally small. These six primitives are the core surface that downstream local agents and apps should build around.

PrimitiveReturnsWritesPrimary use
get_documentdocument metadatadocument.jsonsource snapshot and document root
get_document_structurestable page indexstructure.jsoniterate pages and locate page artifacts
get_semantic_document_structureheading / section treesemantic-structure.jsonchapter navigation without mutating pages[]
get_page_contentpage text artifactpages/<page>.jsonpage retrieval and semantic input
get_page_renderrender metadatarenders/<page>.json + PNGvisual page reuse
get_page_ocrOCR metadataocr/<page>.jsontext recovery over rendered image input

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"

Runtime expectation

  • Node.js >=20
  • ESM import support
  • local-first Node/Bun runtime
  • package exports aware consumer

Not the place for broad tool sprawl.

This 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.