计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
conversion【效率与协作】Use Docling's Python conversion API for local paths, URLs, streams, and in-memory Markdown/HTML/DocLang strings, including safe smoke conversions and failure handling.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a task needs Python API conversion into a DoclingDocument with DocumentConverter, convert, convert_all, convert_string, or DocumentStream.
Route elsewhere when the task is mainly about:
cli-and-formats.document-outputs.pipeline-configuration.advanced-pipelines.DocumentExtractor: extraction.from docling.document_converter import DocumentConverter
converter = DocumentConverter()
result = converter.convert("document.pdf") # local path or URL
markdown = result.document.export_to_markdown()
For string content, do not pass the raw string to convert; use convert_string with a supported InputFormat:
from docling.datamodel.base_models import InputFormat
from docling.document_converter import DocumentConverter
converter = DocumentConverter(allowed_formats=[InputFormat.MD])
result = converter.convert_string("# Title\n\nBody", format=InputFormat.MD, name="note.md")
references/api-reference.md for constructor signatures, source types, limits, headers, batch conversion, and status handling.references/workflows.md for copy-ready local path, URL, stream, string, batch, and smoke-test recipes.references/troubleshooting.md for optional dependency, model download, wrong format option, headers, file limit, invalid path, and raises_on_error failures.scripts/convert_fixture.py for a safe installed-package helper that converts a caller-supplied path or string to Markdown or JSON.allowed_formats=[...] for smoke tests and user-controlled uploads so accidental format detection cannot trigger heavier pipelines.max_num_pages, max_file_size, and page_range for PDFs or untrusted documents.raises_on_error=False when collecting partial batch results; inspect result.status and result.errors before exporting.