Skip to content

Commit

Permalink
Switch charbox
Browse files Browse the repository at this point in the history
  • Loading branch information
VikParuchuri committed Apr 26, 2024
1 parent 250c513 commit ae61f3d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file modified models/dt.joblib
Binary file not shown.
2 changes: 1 addition & 1 deletion pdftext/pdf/chars.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def get_pdfium_chars(pdf_path, fontname_sample_freq=settings.FONTNAME_SAMPLE_FRE

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=False)
coords = text_page.get_charbox(i, loose=True)
device_coords = page_bbox_to_device_bbox(page, coords, page_width, page_height, bl_origin, page_rotation, normalize=True)

char_info = {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pdftext"
version = "0.2.0"
version = "0.2.1"
description = "Extract structured text from pdfs quickly"
authors = ["Vik Paruchuri <vik.paruchuri@gmail.com>"]
license = "Apache-2.0"
Expand Down

0 comments on commit ae61f3d

Please sign in to comment.