Skip to content

Fixes #5319 - #5321

Open
JorjMcKie wants to merge 3 commits into
mainfrom
fix-5319
Open

JorjMcKie wants to merge 3 commits into
mainfrom
fix-5319

Conversation

@JorjMcKie

Copy link
Copy Markdown
Collaborator

We previously used separate code in method variant `page.get_text(sort=True)´ to achieve text output as close as possible to the visual appearance.

This change replaces the code by instead invoking the CLI command pymupdf gettext -mode layout.

This entailed adding a new "clip" keyword parameter to the respective function, which is only reachable in the programming API.

@JorjMcKie JorjMcKie added fix developed release schedule to be determined Has a test and removed fix developed release schedule to be determined Has a test labels Nov 30, 2026
JorjMcKie added a commit that referenced this pull request Dec 2, 2026
We previously used separate code in method variant `page.get_text(sort=True)´ to achieve text output as close as possible to the visual appearance.

This change replaces the code by instead invoking the CLI command
`pymupdf gettext -mode layout`.

This entailed adding a new "clip" keyword parameter to the respective function, which is only reachable in the programming API.
JorjMcKie added a commit that referenced this pull request Dec 2, 2026
In page method get_sorted_text() we previously only sorted by span
coordinates to produce legible text.
This change introduces a by character ("rawdict") approach to ensure
that mis-shaped words and spans do not spoil the final result.
In page method get_sorted_text() we previously only sorted by span
coordinates to produce legible text.
This change introduces a by character ("rawdict") approach to ensure
that mis-shaped words and spans do not spoil the final result.
Other changes include also outputting vertical text (after all horizontal text) and optionally (default) removing page rotation.
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