docling-project / docling-project/docling
Empty markdown returned
- Dominant language
- Python
- Stars
- 66.4k
- Forks
- 4.8k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 95
Description
### Bug
The most simple setup of Docling using all the defaults PDF extraction returns an empty markdown result.
PDF: https://www.govinfo.gov/content/pkg/BILLS-119s1582pcs/pdf/BILLS-119s1582pcs.pdf
### Steps to reproduce
```python
import time
from docling.document_converter import DocumentConverter
from docling.datamodel.accelerator_options import AcceleratorDevice, AcceleratorOptions
from docling.datamodel.base_models import InputFormat
from docling.backend.pypdfium2_backend import PyPdfiumDocumentBackend
from docling.datamodel.pipeline_options import PdfPipelineOptions
from docling.document_converter import DocumentConverter, PdfFormatOption
input_doc_path = "https://www.govinfo.gov/content/pkg/BILLS-119s1582pcs/pdf/BILLS-119s1582pcs.pdf"
# This works:
#
# PyPdfium with EasyOCR.
def pypdfium_with_easyocr():
pipeline_options = PdfPipelineOptions()
pipeline_options.do_ocr = True
pipeline_options.do_table_structure = True
pipeline_options.table_structure_options.do_cell_matching = True
return DocumentConverter(
format_options={
InputFormat.PDF: PdfFormatOption(
pipeline_options=pipeline_options, backend=PyPdfiumDocumentBackend
)
}
)
# This does NOT work:
#
# Docling Parse with EasyOCR (default).
def docling_parse_with_easyocr_default():
pipeline_options = PdfPipelineOptions()
pipeline_options.do_ocr = True
pipeline_options.do_table_structure = True
pipeline_options.table_structure_options.do_cell_matching = True
pipeline_options.ocr_options.lang = ["en"]
pipeline_options.accelerator_options = AcceleratorOptions(
num_threads=4,
device=AcceleratorDevice.AUTO
)
return DocumentConverter(
format_options={
InputFormat.PDF: PdfFormatOption(pipeline_options=pipeline_options)
}
)
# This does NOT work:
def default_with_no_options():
return DocumentConverter()
# Comment to test different options:
# doc_converter = pypdfium_with_easyocr() # Works
# doc_converter = docling_parse_with_easyocr_default() # Empty result
doc_converter = default_with_no_options() # Empty result
start_time = time.time()
conv_result = doc_converter.convert(input_doc_path)
end_time = time.time() - start_time
print(f"Document converted in {end_time:.2f} seconds.")
print(conv_result.document.export_to_markdown())
```
### Docling version
```bash
2025-09-24 01:14:40,747 - INFO - Loading plugin 'docling_defaults'
2025-09-24 01:14:40,749 - INFO - Registered ocr engines: ['easyocr', 'ocrmac', 'rapidocr', 'tesserocr', 'tesseract']
Docling version: 2.54.0
Docling Core version: 2.48.2
Docling IBM Models version: 3.9.1
Docling Parse version: 4.5.0
Python: cpython-311 (3.11.11)
Platform: macOS-26.0-arm64-arm-64bit
```
### Python version
```bash
Python 3.11.11
```
Contributor guide
Research direction
Start by running the provided reproduction against Docling 2.54.0 with the linked PDF, comparing default DocumentConverter behavior with PyPdfiumDocumentBackend. The issue names no source file or test, so trace the default PDF backend and markdown export path until the discrepancy is located. Done means the PDF produces non-empty markdown with the default setup and the regression is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100