Skip to content

Insert_text may add or delete original spaces after a word/character when writing word by word, any solution? #4629

Closed

Description

@nissansz

Description of the bug

Sometimes, apply font_fit according to line image height, then apply a transform_matrix,
Insert_text may add or delete original spaces after a word/character when writing word by word, any solution?
Spaces are appended to end of word as text before writing.

For example, if font is reduced to 0.8font fit, there may be additional spaces when copied from written pdf result.
If font is 0.95
font_fit or 1.0*font fit, some spaces may be missing when copied from written pdf result.

How to reproduce the bug

See above

PyMuPDF version

1.26.3

Operating system

Windows

Python version

3.9

Activity

  1. JorjMcKie commented on Jul 25, 2025

    @JorjMcKie
    Collaborator

    We cannot deal with this without an example. Also not an issue but a Discussions post.

  2. locked and limited conversation to collaborators on Jul 25, 2025
  3. converted this issue into a discussion #4630 on Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions