We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
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
I found this PR for text layer text offset, recalculating ascent and descent. #12896
But the ratio calculated by the property ascent/(ascent + descent) in getTextContent does not match.
ascent/(ascent + descent)
Which is the right way?
chrome 130.0.6723.70
macOS 14.1 (23B2073)
latest
Yes
No
P1 https://www.mckinsey.com/~/media/mckinsey/business%20functions/mckinsey%20digital/our%20insights/the%20economic%20potential%20of%20generative%20ai%20the%20next%20productivity%20frontier/the-economic-potential-of-generative-ai-the-next-productivity-frontier.pdf
The logic is consistent in both places
Calculations using the ascent attribute in getTextContent will be slightly offset
Using the calculations in the text layer is more accurate
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Attach (recommended) or Link to PDF file
I found this PR for text layer text offset, recalculating ascent and descent.
#12896
But the ratio calculated by the property
ascent/(ascent + descent)
in getTextContent does not match.Which is the right way?
Web browser and its version
chrome 130.0.6723.70
Operating system and its version
macOS 14.1 (23B2073)
PDF.js version
latest
Is the bug present in the latest PDF.js version?
Yes
Is a browser extension
No
Steps to reproduce the problem
P1
https://www.mckinsey.com/~/media/mckinsey/business%20functions/mckinsey%20digital/our%20insights/the%20economic%20potential%20of%20generative%20ai%20the%20next%20productivity%20frontier/the-economic-potential-of-generative-ai-the-next-productivity-frontier.pdf
What is the expected behavior?
The logic is consistent in both places
What went wrong?
Calculations using the ascent attribute in getTextContent will be slightly offset

Using the calculations in the text layer is more accurate

Link to a viewer
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: