@llama_index: You shouldn't need a vision model to know your PDF has checkboxes. LiteParse can now pull structured data directly from…
Summary
LiteParse now supports extracting structured data from PDFs—form fields, checkbox states, annotations, images, vector graphics, and word-level bounding boxes—without a vision model, plus complexity signals to route harder pages to tools like LlamaParse.
View Cached Full Text
Cached at: 08/03/26, 09:52 PM
You shouldn’t need a vision model to know your PDF has checkboxes.
LiteParse can now pull structured data directly from your PDFs: form field values, checkbox states, annotations, embedded images, vector graphics, tagged document structure, and word-level bounding boxes, all running in ms per page.
For pages that do need a model, new complexity signals tell you why. Scanned pages, multi-column text, tables (ruled and borderless), and dense figures help you route your parsing to the best tools (like LlamaParse!)
Docs : https://developers.llamaindex.ai/liteparse/guides/extraction/… https://developers.llamaindex.ai/liteparse/guides/complexity/…
Try it: https://github.com/run-llama/parse-gateway…
Extraction Options
Source: https://developers.llamaindex.ai/liteparse/guides/extraction/ By default, LiteParse returns text, geometry, and page metadata. Everything a PDFcancarry beyond that (embedded images, vector art, annotations, form fields, tagged-structure trees, per-glyph typography) isopt-in, behind its own flag.
This keeps the default output shape small, stable, and cheap to produce. It also means that if you’re looking for data you know is in the file and don’t see it in the output, you’re probably missing a flag.
Each option costs parse time and output size. Turn on only what you consume.
Rust / Python / CLINode / WASMAddsextract\_images/\-\-extract\-images``extractImages``images\[\],image\_error\_count``extract\_vector\_graphics/\-\-extract\-vector\-graphics``extractVectorGraphics``pages\[\]\.vector\_graphics``extract\_annotations/\-\-extract\-annotations``extractAnnotations``pages\[\]\.annotations``extract\_form\_fields/\-\-extract\-form\-fields``extractFormFields``pages\[\]\.form\_fields``extract\_structure\_tree/\-\-extract\-structure\-tree``extractStructureTree``pages\[\]\.structure\_tree``extract\_content\_bounds/\-\-extract\-content\-bounds``extractContentBounds``pages\[\]\.content\_bounds``extract\_xfa\_packets/\-\-extract\-xfa\-packets``extractXfaPackets``xfa\_packets\[\]``extract\_text\_metadata/\-\-extract\-text\-metadata``extractTextMetadataextra keys ontext\_items\[\]``include\_complexity/\-\-complexity``includeComplexity``pages\[\]\.complexity``emit\_word\_boxes(no CLI flag)emitWordBoxes``TextItem\.words(bindings only)One toggle isonby default:extract\_links(\-\-no\-linksto disable). See theMarkdown guide.
import { LiteParse } from "@llamaindex/liteparse";const parser = new LiteParse({ outputFormat: "json", extractImages: true, extractFormFields: true, extractAnnotations: true, extractTextMetadata: true,});const result = await parser.parse("form.pdf");
extract\_imagesdecodes embedded raster images and returns their bytes and metadata in a document-levelimagesarray. Pair it withimage\_output\_dirto write each image to disk instead of holding it in memory.
lit parse report.pdf --format json --extract-images --image-output-dir ./images
{ "images": [ { "id": "p1_i0", "name": "image_p1_0.png", "path": "./images/image_p1_0.png", "page": 1, "bbox": { "x": 72.0, "y": 118.5, "width": 240.0, "height": 160.0 }, "width": 800, "height": 533, "rotation": 0.0, "format": "png" } ], "image_error_count": 0}
Notes:
image\_output\_dirrequiresextract\_images— setting it alone is a config error.image\_mode: "embed"also implies extraction, for backwards compatibility.duplicate\_ofis set when the same image appears more than once in the document; the duplicate points at the canonical entry’sidrather than re-storing the pixels.image\_error\_countcounts images that failed to decode. It is omitted when zero.- This is separate from
image\_mode, which only controls how imagereferencesare written into markdown. See theMarkdown guide.
extract\_vector\_graphicsreports the vector drawing operations on each page, split into filled/strokedshapesand straightlines. Useful for finding table rules, underlines, dividers, and chart geometry.
{ "vector_graphics": { "shapes": [ { "bbox": { "x": 72.0, "y": 400.0, "width": 180.0, "height": 90.0 }, "stroke": true, "stroke_color": "#000000", "fill": false, "has_curve": true } ], "lines": [ { "x1": 72.0, "y1": 512.0, "x2": 540.0, "y2": 512.0, "stroke": true, "stroke_width": 0.5, "stroke_color": "#cccccc", "fill": false } ] }}
extract\_annotationsreturns PDF annotations per page — comments, highlights, and link targets.
{ "annotations": [ { "subtype": "Link", "rect": { "x": 72.0, "y": 300.0, "width": 120.0, "height": 12.0 }, "uri": "https://example.com" }, { "subtype": "Highlight", "contents": "check this figure", "title": "Reviewer 2", "created": "D:20260714093000Z", "quadpoint_rects": [ { "x": 72.0, "y": 280.0, "width": 200.0, "height": 11.0 } ] } ]}
Onlysubtypeis always present; every other key is omitted when the annotation doesn’t carry it.
extract\_form\_fieldsreturns AcroForm widgets and their resolved values.
{ "form_fields": [ { "id": "f0", "type": "text", "page": 1, "annotation_index": 0, "widget_index": 0, "field_flags": 0, "name": "applicant_name", "value": "Ada Lovelace", "rect": { "x": 150.0, "y": 640.0, "width": 220.0, "height": 18.0 } }, { "id": "f1", "type": "checkbox", "page": 1, "annotation_index": 1, "widget_index": 0, "field_flags": 0, "name": "agree_terms", "checked": true } ]}
The widget type is serialized as
typein JSON, and istypeon the Node and Python objects. Radio groups and checkbox sets exposecontrol\_count/control\_indexto tie sibling widgets together, and choice fields exposeoptions/selected\_options.
ForXFA-based forms (a different, XML-based form technology), useextract\_xfa\_packetsinstead, which returns the raw XFA packets at document level.
Related:render\_form\_fieldsdraws filled-in field appearances into rendered rasters. It affectsscreenshotsand OCR input pixels, not JSON keys.
extract\_structure\_treereturns the tagged-PDF logical structure — the authoring-time document outline of paragraphs, headings, tables, and lists. Only present in PDFs that were actually tagged.
{ "structure_tree": { "roots": [ { "type": "Document", "children": [ { "type": "H1", "marked_content_ids": [0], "actual_text": "Quarterly Report", "children": [] }, { "type": "P", "marked_content_ids": [1, 2], "children": [] } ] } ] }}
marked\_content\_idsjoin back to themcidfield on text items (available withextract\_text\_metadata), letting you map reconstructed text to its authored role.
extract\_text\_metadataenriches every entry intext\_items\[\]with typography detail. Without it, a text item carries onlytext,x,y,width,height,font\_name, andfont\_size.
{ "text": "Quarterly Report", "x": 72.0, "y": 118.5, "width": 180.4, "height": 14.0, "rotation": 0.0, "font_name": "Helvetica-Bold", "font_size": 14.0, "font_height": 14.2, "font_ascent": 11.1, "font_descent": -3.1, "font_weight": 700, "text_width": 180.4, "font_is_buggy": false, "mcid": 0, "fill_color": "#111111"}
font\_weightandfill\_colorare the practical way to detect emphasis and headings yourself when you need more control than markdown output gives you.font\_is\_buggyflags fonts whose metrics LiteParse had to estimate — treat sizes from those items with suspicion.
extract\_content\_boundsadds acontent\_boundsrect per page: the bounding box of actual content, ignoring the page’s declared media box. Use it to crop whitespace or detect pages whose content sits far from the nominal page area.
{ "content_bounds": { "x": 68.0, "y": 96.0, "width": 476.0, "height": 620.0 } }
emit\_word\_boxessplits each text item into per-word sub-boxes (TextItem\.words), for word-level bounding-box attribution.
This one islibrary- and bindings-only. Word boxes are deliberately excluded from\-\-format json, because on a text-heavy document they dwarf the rest of the payload. There is no CLI flag; reach for it from Node, Python, Rust, or WASM.
const parser = new LiteParse({ emitWordBoxes: true });const result = await parser.parse("report.pdf");for (const item of result.pages[0].textItems) { for (const word of item.words ?? []) { console.log(word.text, word.x, word.y, word.width, word.height); }}
Options with no CLI flag
Section titled “Options with no CLI flag”
A few config options are only reachable from the library and bindings:
OptionDescriptionemit\_word\_boxesPer-word sub-boxes (see above).crop\_boxRestrict output to a sub-region of each page. A text item is kept only if it falls entirely inside.skip\_diagonal\_textDrop text rotated more than 2° off the nearest right angle — watermarks and diagonal stamps.detect\_screenshot\_rectsPopulaterectson screenshot results.render\_form\_fieldsDraw form-field appearances into rendered pages.ocr\_failure\_fatalWhenfalse, a systemic OCR failure returns partial results instead of erroring. Defaults totrue.ocr\_hedge\_delays\_msRequest-hedging schedule for HTTP OCR servers. No effect on built-in Tesseract.crop\_boxtakes the fraction to crop from each side. It is an object in Node and WASM, and a\(top, right, bottom, left\)tuple in Python:
// Drop the top 10% and bottom 5% of every pageconst parser = new LiteParse({ cropBox: { top: 0.1, right: 0.0, bottom: 0.05, left: 0.0 },});
- Document complexity: Route documents before you parse them.
- Markdown output: Images, links, and header/footer handling in markdown.
- CLI reference: Every flag, per command.
- API reference: Full
LiteParseConfigfield list.
Note for AI agents: this documentation is built for programmatic access. - Overview of all docs: https://developers.llamaindex.ai/llms.txt - Any page is available as raw Markdown by appending index.md to its URL — e.g. https://developers.llamaindex.ai/llamaparse/parse/getting_started/index.md - Agent-friendly REST search APIs live under https://developers.llamaindex.ai/api/ — search (BM25 full-text), grep (regex), read (fetch a page), and list (browse the doc tree). See https://developers.llamaindex.ai/llms.txt for parameters. - A hosted documentation MCP server is available at https://developers.llamaindex.ai/mcp. If you support MCP, you can ask the user to install it for browsing these docs directly (an alternative to the REST API). Setup: https://developers.llamaindex.ai/for-agents/mcp/ - Other LlamaIndex tooling for agents — the LlamaParse Platform MCP server, agent skills and plugins, and the n8n node — is mapped at https://developers.llamaindex.ai/for-agents/
Similar Articles
@jerryjliu0: You don't need heavyweight VLMs to OCR simple text-only PDFs. Doing that is like bringing a bazooka to a knife-fight, a…
LlamaIndex announces improved routing in LlamaParse that selects lightweight parsing for simple text-heavy PDFs and heavier VLM-based parsing for complex pages with tables or charts, optimizing cost and accuracy.
@jerryjliu0: LiteParse, our OSS document parser, is really good at parsing complex PDF layouts, text, and tables into a clean spatia…
LiteParse is an open-source, heuristic-based PDF parser that quickly converts complex layouts, text, and tables into a clean spatial grid without relying on ML models.
@llama_index: Most AI pipelines are only as good as the data we provide them with, and that usually means PDFs or other unstructured …
Parse-Flow is an open-source visual workflow designer built by LlamaIndex that chains four document processing primitives—Parse, Classify, Split, and Extract—into a drag-and-drop canvas powered by LlamaAgents workflows, enabling reliable structured data extraction from unstructured enterprise documents like PDFs, contracts, and invoices.
@itsclelia: Do you actually own your document parsing infrastructure? At @llama_index, we wanted to make that easier, so we built �…
LlamaIndex introduces liteparse-server, an open-source, self-hosted HTTP backend for parsing PDFs, images, and Office documents with spatial layout extraction, OCR, and screenshot generation, designed for AI and data workflows.
run-llama/liteparse
LiteParse is a standalone open-source PDF parsing tool from run-llama that provides fast, local spatial text extraction with bounding boxes, supporting multiple programming languages and platforms.