Skip to content

Missing line feed(s) in PDF in text block #1284

@darkandrew7

Description

@darkandrew7

Please provide all mandatory information!

Describe the bug (mandatory)

When placing redact annotations on the attached document, it seems there's a LF discarded during apply_redactions. This causes text that should span multiple lines to be written on one line.

To Reproduce (mandatory)

Place a redaction annotation anywhere on the document and finalize with Page.apply_redactions().

# give me a few minutes to verify the code 

Expected behavior (optional)

There shouldn't be overlapping text.

Screenshots (optional)

incorrect
correct

Your configuration (mandatory)

  • Operating system: debian 10
  • Python version: 3.8
  • PyMuPDF version: 1.18.16 from pip

Problem document:
textbox_linefeed_glitch.pdf

Metadata

Metadata

Assignees

Labels

upstream bugbug outside this package

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions