Skip to content

apply_redactions() erases neighboring text which is not redacted #1809

@tigrankh

Description

@tigrankh

Hi,

I'm facing a strange issue when i apply redaction on a PDF.
I have the following text:
image

in my experiment i redact the word "von", which overlaps with bbox of the word "Niederschrift" below it and erases some of its letters, as shown below:
image

In one of your github issues I saw you recommended using fitz.TOOLS.set_small_glyph_heights(True), which updated the bboxes and they are not overlapping anymore.

However, when i apply redaction to the word "von" it still erases the word below.
I'm suspecting that apply_redactions() isn't just operating on the bbox rectangle, but can't really say for sure. bbox coords of those words do not overlap at all

Could you please help with this ?

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