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() moving text #2957

Closed
indigoviolet opened this issue Jan 2, 2024 · 8 comments
Closed

apply_redactions() moving text #2957

indigoviolet opened this issue Jan 2, 2024 · 8 comments
Labels
upstream bug bug outside this package

Comments

@indigoviolet
Copy link

Description of the bug

test.pdf

I have seen #2210 and #2108, but those have been closed in previous versions.

How to reproduce the bug

doc = fitz.open("test.pdf")
page = doc[0]
page.wrap_contents()
for rect in page.search_for("Dwight Crow"):
    page.add_redact_annot(rect, fill=(1, 0, 0), fontname="courier")

page.apply_redactions()

Before:
image

After: notice that the red redaction box is positioned correctly but the text around it has moved.

image

PyMuPDF version

1.23.7

Operating system

MacOS

Python version

3.11

@JorjMcKie
Copy link
Collaborator

JorjMcKie commented Jan 2, 2024

Thanks for the report. I will check it out.
issue-2957.zip

@JorjMcKie
Copy link
Collaborator

Submitted issue report to https://bugs.ghostscript.com/show_bug.cgi?id=707448.

@JorjMcKie JorjMcKie added the upstream bug bug outside this package label Jan 2, 2024
@indigoviolet
Copy link
Author

Hello, Is there any sense of what to expect on this issue? It is currently a blocker for one of our efforts.

I did link to it via support@ as well but never heard back - should I be going through some other flow?

@JorjMcKie
Copy link
Collaborator

Hello, Is there any sense of what to expect on this issue? It is currently a blocker for one of our efforts.

I did link to it via support@ as well but never heard back - should I be going through some other flow?

I have increased the priority in MuPDF's issue system.
It is always a good idea to underpin your interest as a user there, too.

When you speak of "us": are you a commercial customer? Please do review your license situation. As a commercial customer, your requests will be handled in a top priority channel.

@indigoviolet
Copy link
Author

indigoviolet commented Jan 7, 2024

@JorjMcKie: Thanks for updating the priority and being very responsive here!

yes, we (=my company, additive.ai) have a PyMuPDF commercial license with Artifex. I have emailed support@artifex.com twice now with no response, so perhaps I'm unaware of the right channel to use.

I will create an account on the MuPDF tracker as well.

@JorjMcKie
Copy link
Collaborator

JorjMcKie commented Jan 7, 2024

@indigoviolet - alright, thank you for this important information!
I will see to it.

@JorjMcKie
Copy link
Collaborator

@indigoviolet The MuPDF team has developed a fix, which I have already tested. I can confirm that it works for your test file.
The team is now discussing the rollout schedule for this hotfix.
In the meantime: if you have another example, I am more than willing to test this too for increased confidence.
In case of any data protection concerns, please feel free to use my private e-mail jorj.x.mckie@outlook.de.

@julian-smith-artifex-com
Copy link
Collaborator

Fixed in 1.23.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream bug bug outside this package
Projects
None yet
Development

No branches or pull requests

3 participants