Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply_redactions() move pdf text to right after redaction #2210

Closed
Muskan0905 opened this issue Feb 3, 2023 · 6 comments
Closed

apply_redactions() move pdf text to right after redaction #2210

Muskan0905 opened this issue Feb 3, 2023 · 6 comments
Assignees

Comments

@Muskan0905
Copy link

Please provide all mandatory information!

Describe the bug (mandatory)

During the redaction of a pdf document, the text is misplaced from its original position to the right. The redaction annotations are placed correctly but after applying the apply_redactions() function, this issue occurs.

To Reproduce (mandatory)

  • Open document.
  • Loop pages.
  • Find sensitive information using regex.
  • Add redact annotation
  • Apply redactions

I will send the sample file via email.

Your configuration (mandatory)

3.10.1 (tags/v3.10.1:2cd268a, Dec 6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)]

win32

PyMuPDF 1.19.6: Python bindings for the MuPDF 1.19.0 library.
Version date: 2022-03-03 00:00:01.
Built for Python 3.10 on win32 (64-bit).

@JorjMcKie
Copy link
Collaborator

JorjMcKie commented Feb 4, 2023

I have taken a look at your file: there is a bug in .apply_redactions() which causes wrong positioning of text that survives redacting.
To get this resolved you must submit an example file to MuPDF's issue site. So your data protection concerns must be addressed in one way or the other. If you can provide a file that can be used as an example, I can help prepare it to make error tracking easier.
A one-page file showing the error would be sufficient.

@Muskan0905
Copy link
Author

You can use this file as a sample
Pages from oid22sid900007513did34803163v8.pdf

@JorjMcKie
Copy link
Collaborator

You can use this file as a sample Pages from oid22sid900007513did34803163v8.pdf

Thank you! I will submit the bug report then and keep you in informed.

@JorjMcKie
Copy link
Collaborator

I think your issue could be a duplicate of #2108 in which case it will definitely be fixed in the next version. I need to confirm this.

@JorjMcKie
Copy link
Collaborator

Confirming: your issue is a duplicate of #2108 and thus will be fixed in next version.

@Muskan0905
Copy link
Author

Thanks for the update!!

@JorjMcKie JorjMcKie self-assigned this Feb 10, 2023
JorjMcKie added a commit that referenced this issue Mar 6, 2023
Implements #2011.

Adds support for Pixmap JPEG output.

Fixes #2248, #2210, which are duplicates of #2108 - fixed here.

Adds support for drawing rectangles with rounded corners.
julian-smith-artifex-com pushed a commit to ArtifexSoftware/PyMuPDF-julian that referenced this issue Mar 7, 2023
Implements pymupdf#2011.

Adds support for Pixmap JPEG output.

Fixes pymupdf#2248, pymupdf#2210, which are duplicates of pymupdf#2108 - fixed here.

Adds support for drawing rectangles with rounded corners.
julian-smith-artifex-com pushed a commit to ArtifexSoftware/PyMuPDF-julian that referenced this issue Mar 13, 2023
Implements pymupdf#2011.

Adds support for Pixmap JPEG output.

Fixes pymupdf#2248, pymupdf#2210, which are duplicates of pymupdf#2108 - fixed here.

Adds support for drawing rectangles with rounded corners.
julian-smith-artifex-com pushed a commit to ArtifexSoftware/PyMuPDF-julian that referenced this issue Mar 13, 2023
Implements pymupdf#2011.

Adds support for Pixmap JPEG output.

Fixes pymupdf#2248, pymupdf#2210, which are duplicates of pymupdf#2108 - fixed here.

Adds support for drawing rectangles with rounded corners.
julian-smith-artifex-com pushed a commit that referenced this issue Mar 14, 2023
Implements #2011.

Adds support for Pixmap JPEG output.

Fixes #2248, #2210, which are duplicates of #2108 - fixed here.

Adds support for drawing rectangles with rounded corners.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants