Skip to content

Commit

Permalink
build: update pypdf2
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentbernat committed Jan 7, 2023
1 parent db45c96 commit e7c098f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion extensions/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def _img_properties(self, image):
box = pdf.pages[0].mediabox
# PDF physical sizes may be skewed, notably for
# slides. Assume width will be around 1000.
ratio = Fraction(Fraction(box.getWidth()), Fraction(box.getHeight()))
ratio = Fraction(Fraction(box.width), Fraction(box.height))
ratio = ratio.limit_denominator(100)
width = 1000 // ratio.numerator * ratio.numerator
height = 1000 // ratio.numerator * ratio.denominator
Expand Down
8 changes: 4 additions & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = ["Vincent Bernat <[email protected]>"]
python = "^3.9"
Babel = "2.*"
Pillow = "9.*"
PyPDF2 = "2.*"
PyPDF2 = "3.*"
Pygments = "2.*"
fonttools = {version = "4.*", extras = ["woff", "lxml"]}
langcodes = {version = "3.*", extras = ["data"]}
Expand Down

0 comments on commit e7c098f

Please sign in to comment.