-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
BUG: text position detection works worse than in PyPDF2 #2200
Comments
this is a regression that seems to be due to #2060 |
I think we might need a rendered image for testing. |
@MartinThoma, Can you clarify which image you are talking about? |
test file: |
This probably still needs to be generated. Similar to the watermarking tests, render an image from the page with the corresponding highlighting as in the original issue description and check that it matches the expected position. Nevertheless, I am not sure whether this really is required to detect such issues, as a plain text position test with a set of words/text snippets and their positions should do the same while not requiring any outside rendering. |
I've been able to check the position through pdf inline content analysis and confirmed with PDF-XChange Editor which provides the coordinate of the cursor. |
I meant an image which doesn't exist so far. Something similar to the merge page rendering tests. |
I'm trying to add a highlighting annotation to the doc using the text visitor to identify the coordinates to add it.
Environment
Which environment were you using when you encountered the problem?
Code + PDF
This is a minimal, complete example that shows the issue:
repro repo https://github.com/vors/pypdf-highlighting-repro
Share here the PDF file(s) that cause the issue. The smaller they are, the
better. Let us know if we may add them to our tests!
You can add them to your tests.
Visuals
The text was updated successfully, but these errors were encountered: