@doclith/pdf
v0.6.1
Published
DocLang v0.6 — convertisseur PDF → DocLang (texte + structure, best-effort, sans OCR).
Readme
@doclith/pdf
Convert PDF → DocLang for doclith, using
pdfjs-dist (text + structure, best-effort,
no OCR). Works in Node.js and the browser.
Part of doclith — a TypeScript/JS SDK for the DocLang v0.6 format.
Install
pnpm add @doclith/pdfUsage
import { pdfToDocLang } from "@doclith/pdf"; // async — text + structure
const doc = await pdfToDocLang(new Uint8Array(pdfBytes));Optional layout understanding
An opt-in document-layout model (docling-layout-heron, Apache-2.0) can improve
structure detection. The model weights are not bundled — they are downloaded on
first use (SHA-256 pinned). See THIRD-PARTY-NOTICES.md.
License
Apache-2.0
Portions of the PDF layout handling are derived from the Docling
project (MIT, Copyright (c) 2024 International Business Machines). See THIRD-PARTY-NOTICES.md.
