Skip to content

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

@nissansz

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

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