AWS Textract → Docling
What it saves, what actually moves, what you rebuild — and the thing that catches people.
What it costs, and what it saves
From $15–$65 per 1,000 pages for table and form analysis to zero per page. A 100,000-page corpus ingest goes from a four-figure invoice to a weekend of compute — and, more importantly, re-running it after a chunking change costs nothing instead of the same amount again.
Moves cleanly
The documents themselves, obviously. Extraction is stateless, so there is nothing accumulated to port.
You rebuild
The parsing code, and it usually gets shorter. Textract returns an idiosyncratic block-and-relationship JSON graph that most people wrap in hundreds of lines of traversal; Docling emits Markdown or a structured document object. Expect to delete more than you write.
What AWS Textract costs you today
Per-page usage pricing that varies sharply by feature: plain text detection is around $1.50 per 1,000 pages, while table and form analysis runs closer to $15–$65 per 1,000 pages depending on the combination, with volume tiers. A free tier covers the first months at low volume. The feature multiplier is what surprises people — the analysis you actually need is ten to forty times the price of the OCR you were quoting.
What actually holds you in
Low. Extraction is stateless: document in, structured output out. Nothing accumulates. What needs rewriting is the parsing code that consumes Textract's specific block-and-relationship JSON, which is more idiosyncratic than most — the alternatives here emit Markdown or simpler structures, so the consuming code usually gets shorter. Budget days.
What you are moving to
Docling parses PDFs, Office documents, images and HTML into a structured representation that preserves reading order, tables, figures and headings, then exports to Markdown or JSON. It uses purpose-trained layout and table models rather than heuristics, which is why it holds up on multi-column academic papers and financial statements where simpler extractors interleave columns into nonsense. It integrates directly with LlamaIndex and Haystack, is MIT licensed, and runs entirely locally including on CPU.
Free, MIT. Runs on your own hardware, CPU or GPU.
Docling strengths
- Layout-aware — preserves reading order, tables and structure
- Outputs clean Markdown/JSON that drops into a RAG pipeline
- Direct integrations with LlamaIndex and Haystack
- MIT, fully local, no per-page cost
What you give up
- Slower per page than cloud OCR on very large batches
- Handwriting support is weak compared with Textract
- No specialised invoice or receipt models
The migration, step by step
- 1Take fifty representative documents — the ugly ones. Multi-column layouts, dense tables, poor scans. Run both and compare the extracted text side by side.
- 2`pip install docling`, then `DocumentConverter().convert(path)`. It runs on CPU; a GPU speeds up large batches but is not required to start.
- 3Export to Markdown for RAG pipelines, or to the structured JSON if you need cell-level table access.
- 4Rewrite the consumer against the new shape, and delete the Textract block-graph traversal.
- 5Re-ingest your corpus and diff the chunk counts against the old run. A large discrepancy means a parsing difference worth understanding before you trust it.
- 6Keep Textract on the specific document types where it is clearly ahead — invoices, receipts, identity documents, handwriting — and route only those to it.
The gotcha
Handwriting. Textract is meaningfully better at it and Docling is not close. If any part of your corpus is handwritten forms, a wholesale migration will quietly degrade those documents, and because extraction failures look like plausible text rather than errors, nobody notices until a downstream answer is wrong. Route handwriting separately or do not migrate it.
When to stay on AWS Textract
You are processing invoices, receipts or identity documents at volume — Textract's purpose-trained models for those have no real open equivalent and that gap is the product. Stay too if you are already on AWS with a data-processing agreement or BAA covering it, where the compliance paperwork is worth more than the per-page cost, and at low steady volume where the bill is noise.
More Layer 4 migrations
Figures verified 2026-08-11 against vendor pricing pages. Prices change and migrations differ by estate — treat the cost delta as a starting model, not a quote. Rankings and recommendations here are merit-only; affiliate income never changes a verdict. See our methodology.