harshankur/officeParser
A robust, strictly-typed Node.js and Browser library for parsing office files into a rich Abstract Syntax Tree (AST) and generating high-fidelity output in multiple formats. Parses: docx · pptx · xlsx · odt · odp · ods · pdf · rtf · csv · md · html. Generates: Markdown · HTML · CSV · RTF · PDF · Plain Text · RAG Chunks
What it solves
It provides a unified, strictly-typed way to parse, convert, and generate a wide variety of office document formats (such as DOCX, PDF, PPTX, XLSX, LaTeX, and Markdown) into a consistent Abstract Syntax Tree (AST). It simplifies building applications that need to ingest diverse document types for RAG (Retrieval-Augmented Generation) pipelines, document conversion, or automated template generation.
How it works
When you provide a file (or buffer), the library parses the document into a hierarchical AST that represents the document's structure, including metadata, tables, lists, and formatting. Once in this AST format, you can programmatically manipulate the content or use the library's built-in generators to export the data into another format (e.g., converting a PDF to Markdown or a DOCX to LaTeX). It includes advanced features like OCR for scanned documents, password handling, and native PDF generation.
Who it’s for
Developers building document-processing pipelines, RAG-based AI applications, or tools that require high-fidelity document conversion and templating within Node.js or browser environments.
Highlights
- Universal Parsing: Supports a vast array of formats including DOCX, PPTX, XLSX, ODT, PDF, LaTeX, and Markdown.
- RAG-Ready: Includes native chunking capabilities specifically designed for LLM data ingestion pipelines.
- Format Agnostic: Allows for bidirectional conversion between almost any supported format via a shared AST.
- Advanced PDF Handling: Features a rebuilt PDF engine that recovers layout, tables, and multi-column structures from both tagged and untagged documents.
- Template Engine: Supports mail-merge style document generation using placeholders in templates.
Related
- Dispatch
- Project
- Project
- Project
- Project