-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor/simplify Page.process_objects
This commit reworks the Page.process_objects method to be less complex and more readable. Many of the changes stem from a realization that pdfminer.six already stores most object attributes in the desired type; we only need to convert those requiring decimalization. This results in one notable change to the output, which is that `upright` is no longer converted from a bool to an int. The necessary downstream changes are reflected in utils.extract_words and convert.py. Overall the changes result in no substantial change to performance; it is possible that the code runs ever-so-slightly faster, but to a barely detectable degree.
- Loading branch information
Showing
3 changed files
with
90 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters