docling-project / docling-project/docling

How to detect and remove repeated headers/footers from PDF pages?

Open
#2,037 7 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
66.4k
Forks
4.8k
Avg merge
2d 21h
Merged PRs (30d)
84

Description

Hi, thank you again for the amazing work on Docling!

I'm working with a large number of PDF documents that have consistent headers and footers on every page. These headers/footers often include logos, page numbers, or section titles — and in my case, Docling identifies them as images and saves them as separate elements.

### My Question:
Is there a recommended way in Docling to **detect and remove repeated headers and footers** across pages?
Ideally, I would like to:

- define a fixed vertical area (e.g. top/bottom 5% of the page) to ignore during processing, **or**
- enable some kind of content de-duplication across pages (like comparing bounding boxes or hashes of images/text blocks), **or**
- configure Docling to treat those areas differently (e.g. exclude them from output, or mark them as low-priority).

I found a related issue in the tracker, but it seems there was no concrete solution offered yet.
The related issue : [Elimination of Document Header and Footers](https://github.com/docling-project/docling/issues/1272#top)
But my pdf's header and footer are **images**, so this code didn't work at all.
I'm wondering if there’s any internal option or upcoming feature for this kind of layout-level filtering?

Any suggestions or best practices would be greatly appreciated!

Thanks again for all your hard work and this fantastic tool.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.