docling-project / docling-project/docling-serve

Footnotes Missing from Markdown Output Due to Inability to Include FURNITURE Layer

Open
#271 3 comments 3 reactions 0 assignees View on GitHub

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 Output
docling-serve API (Markdown export) Footnotes missing Markdown Output
🔍 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.