Skip to content

Commit

Permalink
Apply mediabox fix to pts and path
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvine committed Aug 7, 2024
1 parent 9025c3f commit 046bd87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pdfplumber/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,8 @@ def objects(self) -> Dict[str, T_obj_list]:
return self._objects

def point2coord(self, pt: Tuple[T_num, T_num]) -> Tuple[T_num, T_num]:
return (pt[0], self.height - pt[1])
# See note below re. #1181 and mediabox-adjustment reversions
return (self.mediabox[0] + pt[0], self.mediabox[1] + self.height - pt[1])

def process_object(self, obj: LTItem) -> T_obj:
kind = re.sub(lt_pat, "", obj.__class__.__name__).lower()
Expand Down

0 comments on commit 046bd87

Please sign in to comment.