Skip to content

LiteParse Guide: Fast Local PDF Parsing with Bounding Boxes

AINewss Editorial

LiteParse is an Apache-2.0, Rust-based PDF parser from LlamaIndex that extracts spatial text with bounding boxes and no cloud dependency. This guide covers install commands, the `lit` CLI, OCR options, complexity detection, benchmarks and when to switch to LlamaParse. Non-PDF inputs rely on external conversion tools.

View 1 reference
0 views 0 likes

Allow the functional cookie to save your likes. Privacy details

A PDF page with extracted text bounding boxes and Markdown output shown side by side

What is LiteParse?

LiteParse is a standalone open-source PDF parser focused on fast, lightweight local parsing. It extracts spatial text with bounding boxes using PDFium, with no proprietary LLM feature or cloud dependency. Everything runs on your machine, and the same lit command-line tool ships with the Rust, Node.js and Python installs. README

How do you install LiteParse?

Install LiteParse with your usual package manager; the browser build is a separate WASM package. The project publishes the same CLI across Node.js, Python and Rust, so switching languages does not change how you invoke commands. The commands below are copied from the official README.

Language Install command
Node.js / TypeScript npm i -g @llamaindex/liteparse
Python pip install liteparse
Rust (CLI / library) cargo install liteparse / cargo add liteparse
Browser (WASM) npm i @llamaindex/liteparse-wasm

Which lit commands should you know first?

The CLI covers parsing, complexity checks, batch jobs and screenshots. Basic parsing prints text; --format markdown reconstructs headings, tables, lists, images and links; --format json keeps coordinates. Piping a PDF through stdin works for remote documents, and --target-pages limits the work to selected pages.

lit parse document.pdf
lit parse document.pdf --format markdown -o output.md
lit parse document.pdf --format json -o output.json
lit parse document.pdf --target-pages "1-5,10,15-20"
curl -sL https://example.com/report.pdf | lit parse -
lit batch-parse ./input-directory ./output-directory
lit screenshot document.pdf -o ./screenshots --dpi 300

How does LiteParse handle OCR?

LiteParse bundles Tesseract for zero-setup OCR, and can call any HTTP OCR server such as EasyOCR, PaddleOCR or a custom service. An opt-in model family called OCRia-nano-1 adds a CPU pipeline with an 8.1M-parameter line detector, script router, recognizers and a layout model. Use --no-ocr when the PDF already has a reliable text layer.

lit models pull ocria-nano
lit parse document.pdf --no-ocr
lit parse document.pdf --format json --extract-blocks

Can LiteParse tell you when a document is too complex?

Yes. lit is-complex prints a complexity verdict and per-page JSON, and can be used as a shell predicate. The README calls this mode 'purely heuristics and rule-based', so complex documents may not render perfectly. It is a routing aid: decide whether to parse locally, add OCR, or send the file to a heavier parser.

lit is-complex document.pdf
lit is-complex document.pdf --quiet && lit parse document.pdf --no-ocr
lit is-complex document.pdf --compact | jq '[.[] | select(.needs_ocr) | .page_number]'

What do LiteParse's benchmarks actually show?

The README publishes results on ParseBench, opendataloader-bench and olmOCR-bench, with tools at their latest releases as of 9 September 2026. On ParseBench, LiteParse scored 0.364 without OCR, 0.380 with Tesseract and 0.389 with PaddleOCR, against 0.283 for the best other model-free tool. README

Benchmark LiteParse + PaddleOCR Best other model-free tool
ParseBench overall 0.389 0.283
opendataloader-bench overall 0.901 0.842
olmOCR-bench % passed 42.2 33.7

With OCRia-nano-1, the project reports 59.2 on ParseBench-2 and 74.8 on OmniParseBench, citing its own technical report. Charts remain near zero across all tools: none reconstruct chart data.

When should you use LlamaParse instead?

Use LlamaParse for dense tables, multi-column layouts, charts, handwriting and scanned PDFs. LlamaIndex says its cloud parser gives significantly better results on those documents and is built for production pipelines. LiteParse is the right choice when speed, local control and zero cloud dependency matter more than perfect reconstruction.

Situation Choose
Native-text PDFs, need speed and bounding boxes LiteParse
Dense tables or multi-column scans LlamaParse
Offline or regulated environment LiteParse
Markdown for a RAG pipeline with hard layouts LlamaParse

What does Apache 2.0 mean for LiteParse users?

The repository is licensed Apache 2.0, so you can use, modify and distribute it, including commercially, subject to the licence terms. That matters for teams embedding a parser in a product. The OCR backends you plug in may carry their own licences, so check those separately before shipping.

Common LiteParse questions

These questions come up when choosing a local parser for a document pipeline. The answers stay within what the README actually states, including its own admission that rule-based parsing has limits on hard layouts. They are meant to cut setup surprises rather than repeat the benchmark table.

Which file formats can LiteParse read?

The parser handles PDF directly and converts DOCX, XLSX, PPTX and images through LibreOffice or Rust image crates. Conversion dependencies are external, so a minimal PDF-only install does not need them.

Does LiteParse use an LLM?

No. The default pipeline is rule-based with PDFium and Tesseract. The optional OCRia-nano-1 models are small CPU models for detection and recognition, not a generative LLM.

Can it run in the browser?

Yes. A WASM package is published as @llamaindex/liteparse-wasm, though the README notes the WASM build does not ship the same lit CLI as the other installs.

Does OCR slow parsing down?

The README's throughput figures show the trade-off clearly. On a 16-vCPU container, the default Tesseract path managed about 14.2 pages per second, while the optional OCRia-nano-1 pipeline reached 27.8. Skipping OCR with --no-ocr is fastest when the PDF already has a good text layer.

How do I extract images from a PDF?

Use lit parse document.pdf --format markdown --image-mode embed --extract-images --image-output-dir ./images to write image files and reference them from the Markdown. For JSON metadata without changing Markdown handling, use --format json --extract-images.

What platforms are supported?

The README lists Linux, macOS on both Intel and Apple silicon, and Windows. Node.js, Python, Rust and WASM bindings cover most integration paths, so the same parsing core can sit in a server, a desktop tool or a browser.

References

  1. run-llama/liteparse READMEgithub.com