docling-project / docling-project/docling-serve
Footnotes Missing from Markdown Output Due to Inability to Include FURNITURE Layer
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 344
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 8
Description
Docling version: 2.41.0
📌 Problem
When using the docling-serve API to export a PDF as Markdown, footnotes are missing from the result. In contrast, when using the Docling Python library directly, footnotes are included if the FURNITURE layer is explicitly added.
This discrepancy stems from the fact that docling-serve does not expose an option to include or customize content layers—specifically the FURNITURE layer, which contains footnotes, headers, and other secondary text elements.
📄 Reproducible Example
Input PDF:
Recapitulatif_contractuel_bbox_smart_tv_octobre.pdf
| Output Source | Result | Screenshot |
|---|---|---|
| ✅ Docling (Python Library) | Footnotes included | |
❌ docling-serve API (Markdown export) |
Footnotes missing |
🔍 Root Cause
Using the Docling library, you can fix this by passing:
include_layers = {
ContentLayer.BODY,
ContentLayer.FURNITURE # This layer contains footnotes
}
✅ Proposed Fix
Allow users of docling-serve to specify the content layers to include during Markdown export.
This would bring the API in line with what’s already possible using the core Python library, which works as follows:
from docling.models import ContentLayer
include_layers = {
ContentLayer.BODY,
ContentLayer.FURNITURE # This includes footnotes, headers, and other marginal text
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the docling-serve API's Markdown export entry point and compare its options with the Python library's ContentLayer include_layers behavior. Add a way for API users to select content layers, then verify that selecting FURNITURE includes footnotes in the provided PDF's Markdown output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100