Skip to content

Commit

Permalink
fix bug with char bbox when reconstructing spans
Browse files Browse the repository at this point in the history
  • Loading branch information
iammosespaulr committed Jan 25, 2025
1 parent 40252dd commit b2a6ee9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdftext/pdf/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def _reconstruct_spans(orig_span: dict, links: List[Link]) -> List[Span]:
link_bboxes = [Bbox(link['bbox']) for link in links]

for char in orig_span['chars']:
char_bbox = Bbox(char['bbox'])
char_bbox = Bbox(char['bbox'].bbox)
intersections: List[Tuple[float, Link]] = []
for i, link_bbox in enumerate(link_bboxes):
area = link_bbox.intersection_area(char_bbox)
Expand Down

0 comments on commit b2a6ee9

Please sign in to comment.