Parse unstructured documents (PDF, DOCX, PPTX, XLSX, images, and more) locally with LiteParse: fast, lightweight, no cloud dependencies or LLM required.
Already installed via Homebrew:
bash
brew install llamaindex-liteparse
Verify:
bash
lit --version
CategoryFormatsPDF.pdfWord.doc, .docx, .docm, .odt, .rtfPowerPoint.ppt, .pptx, .pptm, .odpSpreadsheets.xls, .xlsx, .xlsm, .ods, .csv, .tsvImages.jpg, .jpeg, .png, .gif, .bmp, .tiff, .webp, .svg
Dependencies:
brew install --cask libreoffice)brew install imagemagick)bash
# Basic text extraction
lit parse document.pdf
# JSON output with bounding boxes
lit parse document.pdf --format json -o output.json
# Specific page range
lit parse document.pdf --target-pages "1-5,10,15-20"
# Disable OCR (faster, text-only PDFs)
lit parse document.pdf --no-ocr
# Higher DPI for better quality
lit parse document.pdf --dpi 300
bash
lit batch-parse ./input-directory ./output-directory
# Only PDFs, recursively
lit batch-parse ./input ./output --extension .pdf --recursive
bash
# All pages
lit screenshot document.pdf -o ./screenshots
# Specific pages
lit screenshot document.pdf --target-pages "1,3,5" -o ./screenshots
# High-DPI PNG
lit screenshot document.pdf --dpi 300 --format png -o ./screenshots
OptionDescription--format jsonStructured JSON with bounding boxes--format textPlain text (default)--target-pages "1-5,10"Parse specific pages--dpi 300Higher rendering quality--no-ocrDisable OCR (faster for text PDFs)--ocr-language fraSet OCR language-o output.jsonSave to file
For repeated use, create liteparse.config.json:
json
{
"ocrLanguage": "en",
"ocrEnabled": true,
"maxPages": 1000,
"dpi": 150,
"outputFormat": "json",
"preciseBoundingBox": true
}
Use with:
bash
lit parse document.pdf --config liteparse.config.json