OpenRouter发布LLM提取PDF表格指南
OpenRouter于2026年10月29日发布指南,介绍如何将PDF发送给可读取文件的LLM,并通过严格JSON模式返回带类型的表格行。其第一方测试涵盖五份PDF,其中两份为扫描件;所有直接读取PDF的模型均正确提取了全部644个单元格。指南还讨论了OCR路由、空结果、输出令牌限制和跨页表格。
该指南给出了结构化PDF提取的具体实现方法和失败检查,但测试仅基于OpenRouter生成的五份PDF。
How to Extract Tables from a PDF with an LLM
OpenRouter ·10/29/2026


To extract tables from a PDF with an LLM, send the PDF to a model that can read files, together with a strict JSON schema that describes one row of the table. The model returns typed rows. Quantities come back as integers, a loss written as (3,878) comes back as -3878, and a table that runs across two pages comes back as one list.
We tested this on five PDFs, two of them scans. Every model that read the PDF directly got all 644 cells right. The failures in our tests came from the route the PDF took to reach the model, and two of them returned a normal response with no error.
#OpenRouter#mistral-ocr#DeepSeek V4.1 Flash#Claude Haiku 5.5#GPT-6 Luna#Cloudflare AI