-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54a4218
commit ebace90
Showing
2 changed files
with
2 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,7 +75,7 @@ def get_pdfium_chars(pdf, fontname_sample_freq=settings.FONTNAME_SAMPLE_FREQ, pa | |
|
||
rotation = pdfium_c.FPDFText_GetCharAngle(text_page, i) | ||
rotation = rotation * 180 / math.pi # convert from radians to degrees | ||
coords = text_page.get_charbox(i, loose=True) | ||
coords = text_page.get_charbox(i, loose=rotation == 0) # Loose doesn't work properly when page is rotated | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mara004
Contributor
|
||
device_coords = page_bbox_to_device_bbox(page, coords, page_width, page_height, bl_origin, page_rotation, normalize=True) | ||
|
||
char_info = { | ||
|
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
Indeed, seems like this is an open issue upstream: https://crbug.com/pdfium/1637