Repository navigation
fix: add page progress callback to to_markdown - #479
JackyHsu-X wants to merge 3 commits into
Conversation
|
Thanks for submission - we really appreciate this.
|
|
I have read the Artifex Contributor License Agreement and declare my agreement with it. |
|
Integrated in Updated the branch for upstream The only textual merge conflict was in Validation:
The tests load the merged source directly with the existing PyMuPDF 1.28.2 native environment and its generated version metadata. No dependencies were installed, no version check was bypassed, and the test runner avoids the repository hook that automatically upgrades optional dependencies. The Aptest/native-2.x/platform matrix was not run locally; these results do not claim PyMuPDF 2.x wheel or CI success. AI assistance was used to prepare the integration and run validation. |
|
Updated the branch for main The merged candidate passes both callback cases and the expanded related conversion/chunking/table group: 96 passed, 3 skipped. All 35 source files parse and match the validated snapshot, and Validation used the existing Windows PyMuPDF 2.0 / MuPDF 1.28.5 native-wheel environment with Python PyMuPDF source from checkout AI assistance was used to prepare and validate this integration. |
Summary
progress_callback(done, total)toto_markdown()without adding a dependency.totalis the number of selected pages.Why
Applications with their own UI cannot use the text printed by
show_progressto update a progress indicator. The callback lets them report conversion progress directly. Fixes #288.Validation
git diff --checkverified.Validation reused an existing Windows PyMuPDF 2.0 / MuPDF 1.28.5 native-wheel environment. PyMuPDF Python code was loaded from the existing checkout
e0bcbeebecause the installed wheel alone lacks the deferred-layout API required by current 4LLM main; native extensions and generated version metadata came from the existing wheel. All 4LLM source came from this branch's merge candidate, and its version guard remained enabled. No dependencies were installed, native extensions rebuilt, or runtime APIs monkeypatched. These source/native combination results do not claim a newly built PyMuPDF wheel or the Aptest/platform matrix passed.--noconftestavoids the repository's automatic optional-dependency upgrade hook.Upstream integration
The branch incorporates main
030a6b0without rebasing. The README is the only textual merge conflict: both upstream installation guidance and the embedded-source callback example are preserved. Upstream deferred imports, placeholder version 2.1 and removal of the obsolete Layout test are retained. Relative to this upstream, the contribution remains five files, 60 additions / 2 deletions, with no CI changes or new dependencies.AI assistance was used to prepare the patch, integration and validation.