Skip to content
Skillpedia
Web scraping51k · #1896

liteparse

Helps your agent extract text and location information from documents. It can process PDFs, Office files, and images, preserving layout.

What it does

LiteParse is a tool that extracts text from documents (like PDFs and Office files) and images. It can understand the text's layout on the page and even perform optical character recognition (OCR) on scanned documents.

When to use it

  • ✓When you need to extract text from a PDF or image without sending the file to the cloud.
  • ✓To get the exact location of each word in a document, useful for precise referencing.
  • ✓To convert scanned documents or images into searchable text.

Example of what to ask your AI

“Extract the text from the financial report PDF, keeping the original formatting.”

Want more? Open the sections below.

How to use

The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.

Skill link

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/liteparse/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/liteparse/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

You provide a file (PDF, DOCX, image) to LiteParse. It reads the content, identifies the text and its position on the page, and returns this information as plain text, JSON with coordinates, or Markdown.

Installation

Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.

In the terminal (Claude Code, Codex, Cursor), in your project folder:

npx skills add K-Dense-AI/scientific-agent-skills --skill liteparse

Or download just the file:

curl -L https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/main/skills/liteparse/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

LiteParse — Local Document Parsing

Overview

LiteParse is an open-source document parser (Rust core, Python/Node bindings) for local, layout-aware text extraction. It produces layout text, structured JSON, or heuristic Markdown. Spatial text items may span several words; Python emit_word_boxes=True adds word boxes when needed.

Verified release: Python liteparse 2.15.0 (September 29, 2026); CLI and synthetic local PDF/image fixtures tested on Python 3.13. Node/Rust examples below are source-checked and illustrative. Images convert through bundled Rust libraries, not ImageMagick. No cloud account is needed, but missing Tesseract language data can download from GitHub and an explicitly configured HTTP OCR service receives document images.

For parser selection vs MarkItDown, PDF manipulation libraries, or LlamaParse, see references/choosing_a_parser.md.

When to Use This Skill

Use LiteParse when you need:

  • Fast local parsing of PDFs or converted Office/image files without cloud dependencies
  • Spatial text with bounding boxes for layout-aware RAG, citation grounding, or figure/table region logic
  • OCR on scanned PDFs or images (bundled Tesseract, or a user-run HTTP OCR server)
  • Page screenshots (PNG) for multimodal agents that must see charts, figures, or handwriting
  • Batch ingestion of literature folders, supplementary PDFs, or protocol libraries
  • Page subsets or password-protected PDFs

When Not to Use

Task Use instead
Markdown for LLM ingestion (EPUB, audio, YouTube, HTML) markitdown skill
Merge/split PDFs, forms, watermarks, rotation A PDF manipulation library such as pypdf
Dense tables, handwriting, production cloud pipelines LlamaParse (cloud; sign up separately)

Installation

uv pip install "liteparse==2.15.0"

This installs the Python bindings and the lit CLI. Verify:

lit --help
python -c "import liteparse; print(liteparse.__version__)"

Optional system tool (for Office inputs):

  • LibreOffice — Word, Excel, PowerPoint, OpenDocument, CSV/TSV

PNG, JPEG, TIFF, WebP, SVG and other supported images convert natively.

Install commands are in references/ocr_and_formats.md.

Node.js / TypeScript (optional): npm i @llamaindex/liteparse@2.15.0 — see references/api_reference.md.


Quick Start

Python

from liteparse import LiteParse

parser = LiteParse(quiet=True)
result = parser.parse("paper.pdf")
print(result.text)

for page in result.pages:
    print(f"Page {page.page_num}: {len(page.text_items)} items")

CLI

# Layout-preserved text (default)
lit parse paper.pdf

# Structured JSON with bounding boxes
lit parse paper.pdf --format json -o paper.json

# Heuristic Markdown, including headings, tables and links
lit parse paper.pdf --format markdown -o paper.md

# Disable OCR on text-native PDFs (faster)
lit parse paper.pdf --no-ocr

Core Workflows

1. Parse to layout-preserved text

Best for quick full-document text or feeding chunkers that do not need coordinates.

parser = LiteParse(ocr_enabled=True, quiet=True)
result = parser.parse("document.pdf")
full_text = result.text
lit parse document.pdf -o output.txt

2. Parse to structured JSON (bounding boxes)

Use when building layout-aware RAG, highlighting source regions, or joining text with screenshots.

from liteparse import LiteParse

parser = LiteParse(output_format="json", quiet=True)
result = parser.parse("document.pdf")

# Programmatic access
for page in result.pages:
    for item in page.text_items:
        bbox = (item.x, item.y, item.width, item.height)
        # item.text, item.confidence, item.font_name, item.font_size
lit parse document.pdf --format json -o document.json

JSON field layout: references/output_formats.md.

3. Parse specific pages

parser = LiteParse(target_pages="1-5,10,15-20", quiet=True)
result = parser.parse("long_paper.pdf")
lit parse long_paper.pdf --target-pages "1-5,10"

4. Parse from bytes or stdin

Useful for uploads, S3 downloads, or piping remote PDFs.

with open("document.pdf", "rb") as f:
    result = parser.parse(f.read())
curl -sL https://example.com/report.pdf | lit parse -

5. Page screenshots for multimodal agents

…

FAQ

Do I need a cloud account to use it?

No, LiteParse works locally on your computer, without needing accounts or sending data to the internet.

Does it work with scanned documents?

Yes, it has built-in OCR to turn text images (like in scanned documents) into text you can copy and search.

Can I extract only specific parts of a document?

Yes, you can specify which pages you want to process, like 'pages 1 to 5' or 'only page 10'.

Details

Original description by the author

Local document and PDF parsing that returns spatial text with bounding boxes. Use for extracting text from PDFs, DOCX, Office files, and images; running OCR on scans; producing layout-preserved JSON for RAG; batch-ingesting folders of papers; or rendering pages to PNG for multimodal agents. Distinguishing capabilities are spatial text boxes, Markdown, page raster output, and local parsing with opt

repo: K-Dense-AI/scientific-agent-skills

Popularity

GitHub stars
51k
Ranking position
#1896
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills