liteparse

Local document and PDF parsing with spatial text and bounding boxes. Use for extracting text from PDFs, DOCX, Office files, and images; OCR on scans; layout-preserved JSON for RAG; batch-ingesting paper folders; or page screenshots for multimodal agents — even when the user does not name liteparse. Prefer over MarkItDown when you need bboxes, fast local parsing, or PNG page renders; prefer over the pdf skill for merge/split/forms.

Install

Hot:45

Download and extract to your skills directory

Copy command and send to AI Agent for auto-install:

Download and install this skill https://openskills.cc/api/download?slug=k-dense-ai-skills-liteparse&locale=en&source=copy

LiteParse — Local Document Parsing and Bounding-Box Text Extraction

Overview


LiteParse is a fast, open-source local document parsing tool focused on layout-aware text extraction and bounding-box coordinate support. It runs entirely on your machine with no need for cloud APIs. It supports many formats such as PDF, Office documents, and images, and includes OCR recognition capabilities. It is especially suitable for RAG applications and document-processing tasks that require text spatial information.

Use Cases

1. Layout-aware RAG systems


When your Retrieval-Augmented Generation (RAG) system needs accurate text location information, LiteParse can provide precise bounding-box coordinates for each text block. This spatial information helps AI understand document structure, locate chart areas, enable accurate quoting, and significantly improve answer accuracy.

2. Local batch document processing


For scenarios that require processing large numbers of literature collections, protocol documents, or archive folders, LiteParse provides efficient batch parsing. It supports recursive directory traversal and parallel OCR processing, allowing you to quickly convert many PDFs, Word, and Excel files into structured JSON or plain text—all handled locally to ensure data privacy.

3. OCR recognition for scanned documents


For scanned PDFs, photos, or handwritten documents, LiteParse includes the Tesseract OCR engine, with no additional installation required. For cases requiring higher recognition quality, it also supports integrating third-party OCR servers. It can generate page PNG screenshots to provide visual context for multimodal AI.

Core Features

1. Layout-aware text extraction and bounding boxes


LiteParse not only extracts text content, but also returns precise spatial coordinates (x, y, width, height), font information, and confidence scores for each text item. This structured output enables programs to understand the document layout, identify the positions and relationships of elements such as headings, paragraphs, and tables, and provides rich context for subsequent intelligent processing.

2. Multi-format support and local OCR


Native support for PDF parsing is provided, and support for common formats like DOCX, XLSX, PPTX, PNG, and JPG can be extended via LibreOffice and ImageMagick. The built-in Tesseract OCR engine handles scanned documents, supports multi-language recognition, and allows configuration of parallel worker count and DPI parameters to balance speed and accuracy.

3. Flexible parsing control


Offers fine-grained parsing options: you can specify a page range to parse, set encrypted PDF passwords, control the OCR toggle, and choose the output format (text or JSON). Data can be read from file paths, byte streams, or standard input, making it suitable for various integration scenarios. Both CLI and Python API are supported, facilitating automation scripts and workflow integration.

FAQ

What is the difference between LiteParse and LlamaParse?


LiteParse is a fully local parsing tool that does not require cloud APIs, making it suitable for privacy-focused and local processing scenarios. It provides bounding-box coordinates and layout information, but does not output Markdown. LlamaParse is a cloud service with stronger recognition capabilities for complex tables and handwritten content, but it requires network access and an API key. If you need local processing and text coordinates, choose LiteParse; if you need production-grade cloud processing and Markdown output, consider LlamaParse.

How do I use LiteParse to extract PDF text and bounding boxes?


Using the Python API:
from liteparse import LiteParse; parser = LiteParse(output_format="json"); result = parser.parse("document.pdf")
Then iterate over result.pages to get each page’s text_items. Each item contains fields such as text, x, y, width, height, font_name, font_size, and more.
Using the CLI: lit parse document.pdf --format json -o output.json can directly generate a structured JSON file.

What document formats does LiteParse support?


LiteParse natively supports PDF. By installing LibreOffice (for Office files) and ImageMagick (for image files), it can be extended to support common formats such as DOCX, XLSX, PPTX, DOC, ODT, CSV, PNG, JPG, TIFF, WebP, and SVG. The system will automatically convert non-PDF files to PDF before parsing. If the required conversion tools are missing, it will provide clear error messages and installation suggestions.

How do I configure LiteParse’s OCR functionality?


OCR is enabled by default and uses the built-in Tesseract engine. You can configure language, parallelism, and resolution via LiteParse(ocr_enabled=True, ocr_language="eng", num_workers=4, dpi=150).
CLI: lit parse scan.pdf --ocr-language fra --no-ocr.
For offline environments, set the TESSDATA_PREFIX environment variable to the directory containing the .traineddata files. For higher accuracy, you can configure the address of an HTTP OCR server.

Can LiteParse parse documents in batches?


Yes. Using the CLI command lit batch-parse ./input_dir ./output_dir --format json --recursive --extension .pdf, it can recursively process the entire directory tree and filter by specific extensions using --extension. In a Python environment, you can use scripts/batch_parse_dir.py for batch processing with no network calls. Batch parsing supports parallel OCR, making it suitable for large-scale literature archiving and data preparation tasks.

How do I parse encrypted PDF files?


Provide the password via the password parameter.
Python: parser = LiteParse(password="secret"); result = parser.parse("protected.pdf")
CLI: lit parse protected.pdf --password secret
LiteParse decrypts the document using the provided password before parsing, making it suitable for password-protected academic literature, contract agreements, and similar scenarios.

Does LiteParse require a network connection?


No. LiteParse runs entirely locally, and both the core parsing engine and OCR functionality do not require network access. This makes it suitable for offline environments, intranet deployments, or situations where data privacy is critical. Network access is only needed if you choose to use an external HTTP OCR service, which is optional.

How do I generate PDF page screenshots with LiteParse?


Use parser.screenshot("document.pdf", page_numbers=[1,2,3], dpi=150), which returns a list of objects containing the screenshot byte streams for the specified pages.
CLI: lit screenshot document.pdf --target-pages "1,3,5" --dpi 300 -o ./screenshots.
The screenshot feature provides visual context for multimodal AI and is especially useful for pages that include charts, complex tables, or handwritten annotations.