Skills2026年3月29日·1 分钟阅读

Docling — Document Parsing for AI

IBM document parsing library. Converts PDFs, DOCX, PPTX, images, and HTML into structured markdown or JSON. Built for RAG pipelines and LLM ingestion.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Docling — Document Parsing for AI
直接安装命令
npx -y tokrepo@latest install 443e86c2-3811-496e-8e4d-6eef742ab219 --target codex

先 dry-run 确认安装计划,再运行此命令。

TL;DR
IBM document parser converting PDFs, DOCX, PPTX, and images into structured markdown or JSON for LLMs.
§01

What it is

Docling is IBM's open-source document parsing library that converts PDFs, Word documents, PowerPoint files, images, and HTML into structured markdown or JSON. It handles complex layouts with tables, headers, figures, and multi-column text, producing clean output suitable for RAG pipelines and LLM ingestion. The library uses AI models for layout understanding and OCR when needed.

Developers building RAG applications, document Q&A systems, or any pipeline that needs to extract structured text from documents benefit from Docling. It replaces fragile PDF parsers with a model-based approach that handles real-world document complexity.

§02

How it saves time or tokens

Docling produces clean, structured output that LLMs can process directly. Without it, developers chain together multiple tools (PDF parsers, table extractors, OCR engines) and write custom post-processing code. Docling handles the entire pipeline in one library call. Clean output also means fewer tokens wasted on HTML tags, layout artifacts, and parsing noise.

§03

How to use

  1. Install Docling via pip
  2. Create a DocumentConverter instance
  3. Convert documents and get structured markdown or JSON
§04

Example

from docling.document_converter import DocumentConverter

converter = DocumentConverter()
result = converter.convert('report.pdf')

# Get markdown output
markdown = result.document.export_to_markdown()
print(markdown)

# Get structured JSON
json_output = result.document.export_to_dict()

# Process multiple files
for path in ['doc1.pdf', 'doc2.docx', 'slides.pptx']:
    result = converter.convert(path)
    print(f'{path}: {len(result.document.pages)} pages')
§05

Related on TokRepo

§06

Common pitfalls

  • Complex table layouts with merged cells may not parse perfectly; verify output for critical documents
  • OCR accuracy depends on image quality; low-resolution scans produce lower quality text extraction
  • Processing large documents (100+ pages) can be slow; batch processing with parallel workers improves throughput

常见问题

Which file formats does Docling support?+

Docling supports PDF, DOCX, PPTX, images (PNG, JPEG, TIFF), HTML, and AsciiDoc. PDF is the primary format with the most robust parsing support. Other formats have varying levels of layout preservation.

How does Docling handle tables?+

Docling uses AI models to detect table boundaries and cell structure. Tables are converted to markdown tables or structured JSON with row and column information. Complex tables with merged cells may require post-processing.

Can Docling process scanned PDFs?+

Yes. Docling includes OCR capabilities for scanned documents and images. The OCR pipeline runs automatically when text is not extractable from the PDF. Quality depends on scan resolution.

How does Docling compare to LlamaParse?+

Docling is open-source and runs locally with no API costs. LlamaParse is a cloud service with potentially better accuracy on complex layouts but requires an API key and per-page pricing. Docling gives you data privacy and no usage fees.

Is Docling suitable for production use?+

Yes. Docling is maintained by IBM Research and used in production document processing pipelines. It handles common document formats reliably. For edge cases, combine it with fallback parsers.

引用来源 (3)
🙏

来源与感谢

Created by IBM. Licensed under MIT. DS4SD/docling — 15K+ GitHub stars

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产