How docling-project/docling works
Docling converts diverse local or remote inputs into a structured DoclingDocument, then exports formats such as Markdown and JSON. The principal Python workflow starts at DocumentConverter, selects a format backend, runs an appropriate conversion pipeline, and returns the document for export. PDF processing adds layout and document-understanding stages; separate pipelines cover VLM, audio, and video. The README documents broader format and integration capabilities than the sampled source establishes in detail, so those subsystem links are documented rather than inferred from folder names.
Main entry points: standard_pdf_pipeline.py PDF pipeline · document_converter.py Document converter · document.py Document model · backend Format backends
Components 18
Entry and conversion
- Document converter
docling/document_converter.py - CLI
docling/cli/main.py
Format ingestion
- Input detection
docling/datamodel/document.py - Format backends
docling/backend - PDF backend
docling/backend/pdf_backend.py
Document understanding
- PDF pipeline
docling/pipeline/standard_pdf_pipeline.py - Pipeline foundation
docling/pipeline/base_pipeline.py - Layout and order
docling/models/stages/layout/layout_model.py - OCR
docling/models/stages/ocr - Table structure
docling/models/stages/table_structure - Content enrichment
docling/models/stages - VLM pipeline
docling/pipeline/vlm_pipeline.py - Audio and video
docling/pipeline
Results and access
- Document model
docling/datamodel/document.py - Document export
docling/datamodel/document.py - Service client
docling/service_client/client.py
Other components
- User
- Docling service
Connections 17
- User → Document converter: converts input
- User → CLI: runs conversion
- Document converter → Input detection: detects format
- Input detection → Format backends: selects backend
docling/datamodel/document.py - Format backends → Document model: parses formats
docling/backend/abstract_backend.py - PDF backend → PDF pipeline: provides PDF input
docling/pipeline/standard_pdf_pipeline.py - PDF pipeline → Layout and order: analyzes layout
docling/pipeline/standard_pdf_pipeline.py - PDF pipeline → OCR: supports OCR
- PDF pipeline → Table structure: structures tables
- PDF pipeline → Content enrichment: enriches content
docling/pipeline/standard_pdf_pipeline.py - PDF pipeline → Pipeline foundation: extends foundation
docling/pipeline/standard_pdf_pipeline.py - Document converter → Document model: returns result
- Document model → Document export: exports formats
docling/datamodel/document.py - Document converter → VLM pipeline: supports VLM mode
- Document converter → Audio and video: supports media
- User → Docling service: uses API
- Service client → Docling service: calls service