Overview
SimplePipeline is used for document formats and backends that can produce DoclingDocument output directly without page-level processing. This pipeline is suitable for declarative backends that don’t require complex multi-stage conversion.
Class Signature
Parameters
Configuration options for the simple pipeline
Methods
execute
Executes the pipeline on an input document.Input document to process
If True, raises exceptions on errors; otherwise captures them in ConversionResult
Conversion result containing the processed document and status
get_default_options
Returns default pipeline options.Default configuration for SimplePipeline
is_backend_supported
Checks if a backend is supported by this pipeline.Backend instance to check
True if backend is DeclarativeDocumentBackend, False otherwise
Supported Backends
SimplePipeline requires backends that implementDeclarativeDocumentBackend, which can output a DoclingDocument directly. Examples include:
- Markdown backend
- HTML backend
- Other declarative format backends
Processing Flow
Unlike paginated pipelines, SimplePipeline:- Calls the backend’s
convert()method directly - Receives a complete
DoclingDocumentfrom the backend - Optionally applies enrichment models (picture classification, description, etc.)
- Returns the result with
SUCCESSstatus
Usage Example
Error Handling
The pipeline raises aRuntimeError if:
- The backend is not a
DeclarativeDocumentBackend - The backend’s
convert()method fails
raises_on_error=False in execute() to capture errors in ConversionResult.errors instead.
When to Use
UseSimplePipeline when:
- Working with declarative formats (Markdown, HTML, etc.)
- The backend can produce complete document structure directly
- Page-level processing is not required
- Simple, fast conversion is needed
StandardPdfPipeline instead.