LiteParse on a scanned PDF, tested
96.0%
of words from a 10-page scan, by default
Skip the install: one HTTP call
LiteParse vs Docling vs MarkItDown on one scan
| Scan B, 10 book pages | Words of 1,955 | Seconds a page |
|---|---|---|
| LiteParse, Tesseract, text | 1,876 | 1.26 |
| LiteParse, Tesseract, Markdown | 1,735 | 1.26 |
| LiteParse, OCRia-nano, Markdown, 1 worker | 1,905 | 0.69 |
| Docling, auto OCR | 1,855 | 4.5 |
| Docling with ocrmac | 1,914 | 1.4 |
| MarkItDown | 0 | No text |
| Our Actor's page code | 1,877 | 6.1 |
Same scan, same scorer: true words found in order. The seconds come from different runs on this Mac, so they are rough.
LlamaParse, the LlamaCloud parser, needs an API key. I did not test it.
It runs OCR on a scan by itself
OCR is on by default, and Tesseract is built into the 12.3 MB Mac wheel. No other install.
- The first OCR downloads the English language file, 15.4 MB, from tessdata_best.
- Defaults: Tesseract, English, 150 dpi, despeckle on, and your CPU cores minus 1 as workers.
-
Once you pull OCRia-nano, it becomes the default backend, at 250
dpi. Pass
ocr_backend="tesseract"to stay on Tesseract. - Peak memory: 237 MiB, with 2 workers.
-
Its
is_complex()check marked all 10 scan pagesneeds_ocr: true, reasonscanned. Typed PDF pages: false.
Tesseract's Markdown lost 141 words
On justified lines, the Markdown step pulled words out of their line. Page 1, the text output:
name of herring could one of the yacht’s boats
The same line in the Markdown:
###### of herring could one of the yacht’s boats
name
- Page 6, short lines of dialogue, came out as a false table.
-
The fix: with Tesseract, read
page.text, notpage.markdown. Withoutput_format="markdown", one parse gives both. - OCRia-nano's Markdown kept its words and joined lines into paragraphs. It drops the running head.
OCRia-nano read more, under a stricter license
OCRia-nano-1 is the opt-in OCR model from LlamaIndex: 75 MB with ONNX Runtime, pulled once.
-
With
num_workers=2it used 2.64 cores: ONNX Runtime ignoresOMP_NUM_THREADS. - One worker: 1.84 cores, 689 MiB peak, the same words.
License: a modified OpenRAIL-M, not open source. Benchmarks and published results are allowed.
Outside research, no use in a competing OCR or parsing service. And no use if you, your employer or your company had over $2M in revenue last year or $2M in funding, except personal use.
So it is not in our Actor, and it will not be.
- Model: OCRia-nano-1 by LlamaIndex
- Its license: OCRia-nano-1 model license
What the license says, in its words
- Research Purposes (n)(ii): "evaluating or benchmarking the Model, by any person or organization, including publishing the results".
- Attachment A 2(c): no use "to provide, or as part of, a Competing Service". That is a parsing or OCR product that competes with LlamaParse or LlamaCloud.
- Attachment A 2(a) and 2(b): the $2,000,000 revenue and funding limits above, except personal use or Research Purposes.
- Section 7: credit LlamaIndex, link the model, give a copy of the license, and say what you changed. I changed nothing.
- Section 8: its output may not be used to make a model that copies it, for example by distillation, except for Research Purposes.
Typed PDFs: fast, until OCRia-nano is installed
| Typed PDF, 10 pages | ms a page, 5 runs | Peak memory |
|---|---|---|
| No model package | 4.1 to 5.4 | 40.5 MiB |
| OCRia-nano installed | 36.8 to 45.8 | 290 MiB |
LiteParse's README says about 2 to 5 ms a page. Without the model, that held. With it, its table model also ran on typed pages, about 8 times slower.
The fix for typed-only jobs: point LITEPARSE_MODEL_DIR at
an empty folder, before the import.
import os
os.environ["LITEPARSE_MODEL_DIR"] = "/path/to/empty-folder"
from liteparse import LiteParse
Same words either way: all 1,955 in the Markdown.
Set it up in Python
pip install liteparse==2.21.3
from liteparse import LiteParse
parser = LiteParse(num_workers=2)
result = parser.parse("scan.pdf")
for page in result.pages:
print(page.page_num, page.text)
-
One wheel, no other packages. It adds the
litcommand. -
For OCRia-nano:
from liteparse import models, thenmodels.pull("ocria-nano")once, thenLiteParse(ocr_backend="ocria-nano", num_workers=1). -
get_config()fails in 2.21.3 with an AttributeError (keep_clipped_text). I readparser._native.configinstead, a private field.
No machine to install on? Our Actor
LiteParse is fine on one Mac. Our Apify Actor, PDF to Markdown OCR, is for when you have no machine to install on, or want a scan as Markdown from an agent or one HTTP call.
On this scan it found one word more than LiteParse's Tesseract text, and 142 more than its Markdown. It was slower.
The API call
curl -s -X POST "https://api.apify.com/v2/acts/brasspage~pdf-ocr-to-markdown/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"documentUrls": ["https://api.apify.com/v2/key-value-stores/sTnmNrGoSsi7tLQvs/records/langchain-scan-10-pages.pdf"]}'
- $0.006 per OCR page, plus $0.00005 a run at the default 1 GB. Pages with their own text layer are free.
- Runs bill to your Apify account. Your files go to Apify's servers.
- The 6.1 s a page is its page code, run on this Mac with 1 thread, not the live Actor.
What I tested, and what I did not
- One clean scan of book prose. No tables, columns or handwriting.
- Not tested: Tesseract at 300 dpi, other languages, despeckle off.
-
Not tested: the
litcommand, the npm package, Linux. - Not tested: the live Actor on Apify.
How I tested
- Scan B: 10 proofread book pages, 1,955 true words, no text layer. The typed PDF holds the same text.
- Score: true words found in order, the same scorer as for Docling and MarkItDown.
- LiteParse 2.21.3, the macOS arm64 wheel, Python 3.14.7, one job at a time at background priority.
- Seconds a page: the parse call, after the import, over 10 pages. Peak memory: the max RSS of the process.
- Each job ran in macOS sandbox-exec with my home folder blocked. The network was on only for the first OCR and the model pull.
- Docling: docling-mcp, offline, auto OCR (RapidOCR on torch) or ocrmac. Seconds from its second call of 5 pages.
- MarkItDown: markitdown-mcp 0.0.1a8, the same scan, on Nov 26.
- Our Actor: its page code, Tesseract 5.5.4, 1 thread, on this Mac. Not an Apify run.
- LiteParse is Apache-2.0. Of its 378 bundled parts, only resvg and usvg are not permissive: MPL-2.0.
Sources
- LiteParse on GitHub
- liteparse 2.21.3 on PyPI
- Scripts and results stay in our private repo, in research/bench/liteparse-2026-11-27/.
- We make the Apify Actor, not LiteParse or OCRia-nano.
Questions people ask
Does LiteParse do OCR on scanned PDFs?
Yes, by default, with Tesseract built into the wheel. It read 96.0% of the words on a 10-page scan. It downloads the English language file on the first OCR.
LiteParse vs Docling: which reads scans better?
On my scan, Docling with ocrmac found the most words, 1,914 of 1,955. LiteParse with OCRia-nano came close and was faster. Docling's auto OCR found fewer words than LiteParse's Tesseract text, but more than its Markdown.
Is LiteParse a free LlamaParse alternative?
LiteParse is free and runs locally, under Apache-2.0. LlamaParse is the cloud parser from LlamaIndex, and it needs a LlamaCloud API key. I did not test it, so I cannot compare the two.
Related guides
- PDF to Markdown in Python: 5 libraries tested (2026)
- Docling OCR engines: EasyOCR vs Tesseract vs RapidOCR
- PDF MCP server: 6 PDF reader servers tested on a scan
- MarkItDown MCP server: tested on 11 files, scans included
- LlamaIndex OCR for scanned PDFs, tested
- OpenDataLoader PDF on a scanned PDF: hybrid OCR tested