docs: add visual-safe reader export example - #3919
Draft
one-num-three wants to merge 1 commit into
Draft
Conversation
Contributor
|
✅ DCO Check Passed Thanks @one-num-three, all your commits are properly signed off. 🎉 |
Author
|
你好,谢谢你给我写信,现在我不在电脑旁,在时我会回信给你.
|
Contributor
Merge Protections🟢 Merge protection satisfied — ready to merge. Show 1 satisfied protection🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
|
one-num-three
force-pushed
the
agent/export-pdf-visual-blocks
branch
from
July 31, 2026 11:21
f05894a to
a05de50
Compare
Signed-off-by: 可可磨成粉 <16092910+Keke_cocoa@user.noreply.gitee.com>
one-num-three
force-pushed
the
agent/export-pdf-visual-blocks
branch
from
July 31, 2026 12:32
a05de50 to
d9eee08
Compare
Member
|
@one-num-three can you please provide an example of the export with and without your code? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a documented
export_visual_blocks.pyexample for converting research PDFs into reader-oriented Markdown with source-positioned visual assets.Why
A semantic PDF conversion can emit chart labels, table cells, and diagram glyphs as ordinary text. In a reader this creates duplicated content, broken reading order, and apparent gibberish after a figure. Vector-only charts can also be absent from image extraction.
What changes
Impact
This is an opt-in documentation example. It does not change Docling's conversion defaults or public APIs. It needs the optional
pymupdfpackage.Validation
ruff check docs/examples/export_visual_blocks.pyruff format --check docs/examples/export_visual_blocks.pypython -m py_compile docs/examples/export_visual_blocks.pyPdfPipelineOptionsfields against an installed Docling environment--input,--output, and--pagesA real-PDF end-to-end smoke run was attempted with a one-minute local command limit; it exceeded that limit during Docling model initialization, so full conversion should be exercised in the project CI or a fully warmed environment.