Skip to content

feat: add page metadata support#647

Open
gyx09212214-prog wants to merge 2 commits into
docling-project:mainfrom
gyx09212214-prog:codex/page-item-meta
Open

feat: add page metadata support#647
gyx09212214-prog wants to merge 2 commits into
docling-project:mainfrom
gyx09212214-prog:codex/page-item-meta

Conversation

@gyx09212214-prog

Copy link
Copy Markdown

Summary

  • add PageMeta as the page-level metadata model
  • allow PageItem and DoclingDocument.add_page(...) to carry optional page metadata
  • add JSON export/model-validation round-trip coverage for page summaries and namespaced custom metadata

Why

Refs docling-project/docling#1005.

Floating items already expose meta, but pages did not have an equivalent metadata slot. This gives downstream document hierarchy, Doc2KG, and RAG pipelines a structured place to carry page-level summaries, entities, source-scope tags, or other namespaced metadata without changing default output when no metadata is supplied.

Tests

  • python -m pytest test\test_serialization.py -q
  • python -m ruff check docling_core\types\doc\document.py docling_core\types\doc\__init__.py test\test_serialization.py
  • python -m ruff format --check docling_core\types\doc\document.py docling_core\types\doc\__init__.py test\test_serialization.py
  • python -m py_compile docling_core\types\doc\document.py docling_core\types\doc\__init__.py test\test_serialization.py
  • git diff --check

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

DCO Check Passed

Thanks @gyx09212214-prog, all your commits are properly signed off. 🎉

@gyx09212214-prog gyx09212214-prog marked this pull request as ready for review June 18, 2026 09:17
…og@users.noreply.github.com>

I, gyx09212214-prog <243787584+gyx09212214-prog@users.noreply.github.com>, hereby add my Signed-off-by to this commit: 480883d

Signed-off-by: gyx09212214-prog <243787584+gyx09212214-prog@users.noreply.github.com>
@mergify

mergify Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 1 of 2 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 Require two reviewer for test updates 👀 reviews
🟢 Enforce conventional commit

🔴 Require two reviewer for test updates

Waiting for

  • #approved-reviews-by >= 2
This rule is failing.

When test data is updated, we require two reviewers

  • #approved-reviews-by >= 2

Show 1 satisfied protection

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant