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

Fix bug in computing character bounding box #348

Merged
merged 6 commits into from
Jan 16, 2020
Merged

Conversation

pietermarsman
Copy link
Member

@pietermarsman pietermarsman commented Dec 30, 2019

Description

The /FontBBox property of the font was used, but this is not specified in the PDF Reference (see Section 5.3).

Fixes #48
Partially fixes #72

How Has This Been Tested?

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the README.md and other documentation, or I am sure that this is not necessary
  • I have added a consice human-readable description of the change to CHANGELOG.md
  • I have added docstrings to newly created methods and classes
  • I have optimized the code at least one time after creating the initial version
  • Test with other pdf's

…df`, because it looks like an improvement. However, when I view `samples/simple3.pdf` I don't see any text at all. The change in expected outcome is explained by the fact that the bounding boxes of characters can be different, depending on the `/FontBBox` parameter of the font.
@pombredanne
Copy link
Contributor

LGTM

@pietermarsman pietermarsman merged commit fff3ac2 into develop Jan 16, 2020
@pietermarsman pietermarsman deleted the fix-font-height branch January 21, 2020 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PDF to HTML conversion issues Incorrectly Determining Height of Characters
2 participants