lacspace-extract
Pull text and tables out of PDFs, HTML pages and spreadsheets.
npx lacspace-extract report.pdfEverything, in one command
lacspace-extract ships its own zero-dependency PDF text engine — it inflates FlateDecode content streams and parses the text operators, so ordinary text-based PDFs turn straight into text (and best-effort tables). HTML <table>s become header-keyed rows, and spreadsheets/CSV convert between formats — all through the same export pipeline as the rest of the toolkit. Note: scanned/image PDFs need OCR and aren't supported.
What's inside
PDF text
Zero-dependency engine: inflates FlateDecode + parses text operators. No OCR.
Tables
Every HTML <table> → rows; PDF/text column-aligned tables best-effort.
Spreadsheets
Read CSV/TSV/Excel/JSON/NDJSON and convert between them.
Any format out
JSON, NDJSON, CSV, Excel or plain text.
Engines exported
extractPdfText, htmlTables and lineTables are yours to call directly.
Tiny + honest
No native deps; clear about scanned/image PDFs needing OCR.
Copy, paste, done
Real commands and snippets — from a one-liner to the typed library.
npx lacspace-extract report.pdf # print the text
npx lacspace-extract report.pdf -o report.txtText-based PDFs (FlateDecode). Scanned PDFs need OCR — not supported.
npx lacspace-extract statement.pdf --tables -f xlsx -o statement.xlsxBest-effort, column-aligned tables.
npx lacspace-extract prices.html -f csv -o prices.csvEvery <table> becomes header-keyed rows.
import { extractFile, extractPdfText } from "lacspace-extract";
const { text, pageCount } = await extractFile("report.pdf");
const { tables } = await extractFile("page.html");What people build with it
✓ Invoice & statement data
✓ Report tables → spreadsheets
✓ Scrape then extract linked PDFs
✓ Convert documents to datasets
Run lacspace-extract today
Free, open-source, no API keys. It's a CLI and a typed library.
npx lacspace-extract report.pdf