docling-project / docling-project/docling-core

Add SPLIT_PAGE_CONTENT_ONLY output mode to HTML export

Open
#356 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
282
Forks
214
Avg merge
2d 15h
Merged PRs (30d)
21

Description

**Feature Request: Add SPLIT_PAGE_CONTENT_ONLY output mode to HTML export**

I'm requesting an enhancement to the HTML export functionality in `docling_core`. Currently, the split page view (`SPLIT_PAGE`) outputs each page as a table row, with an image and content. For some use cases, table structure and images are unnecessary, and it would be useful to have page-wise content separated in `

` blocks, each with a `data-page` attribute for page numbering, but *without* images or table markup.

**Proposed solution:**
- Add a new output style (`SPLIT_PAGE_CONTENT_ONLY`) to the `HTMLOutputStyle` enum.
- In the `HTMLDocSerializer.serialize_doc` method, implement a block that:
- Splits the document per page (like current split logic),
- Outputs each page as `

...
` (where `N` is the page number),
- Does *not* include images or table structure.

This would allow users to directly export clean, page-wise HTML content for further web embedding or processing.

**Suggested code changes:**
- Extend the `HTMLOutputStyle` enum.
- Add corresponding logic in the serializer as outlined above.

Thank you!

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.