Skip to content

Commit

Permalink
Issue pdfminer#720 PDFObjRef insted of int
Browse files Browse the repository at this point in the history
self.attrs['MediaBox'] contains params with type PDFObjRef insted of int.
I used resolve1 on all params in self.attrs['MediaBox'] to eliminate problem
  • Loading branch information
gosiafilipek authored Jun 28, 2022
1 parent 86e3487 commit 26df6fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pdfminer/pdfpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def __init__(
self.resources: Dict[object, object] = resolve1(
self.attrs.get("Resources", dict())
)
self.mediabox: Rect = resolve1(self.attrs["MediaBox"])
self.mediabox= [resolve1(mediabox_param) for mediabox_param in self.attrs['MediaBox']]
self.mediabox: Rect = resolve1(self.mediabox)
if "CropBox" in self.attrs:
self.cropbox: Rect = resolve1(self.attrs["CropBox"])
else:
Expand Down

0 comments on commit 26df6fb

Please sign in to comment.