# How to extract tables from a PDF with an LLM

> Original title: How to Extract Tables from a PDF with an LLM

- Source: OpenRouter Blog
- Published: 2026-10-29T00:00:00.000Z
- Bad Influence: https://badinfluence.news/items/rhxjqhpxkgwr99tda1oiy4axz
- Original: https://openrouter.ai/blog/tutorials/extract-tables-from-pdf-llm/

## Summary

OpenRouter says a strict JSON schema for one table row turns PDF tables into typed rows, with field descriptions handling cleanup such as negative values in parentheses. Its tests on five PDFs, including two scans, found every model that read the PDF directly got all 644 cells right. Failures came from the parsing route: a free cloudflare-ai parser returned zero rows with no error on a scan, and long tables can stop at the output token limit, so the guide says to reject empty results and any response with finish_reason "length".
