Pymupdf: version 1.18.5 breaks showPDFpage

Created on 20 Dec 2020  路  3Comments  路  Source: pymupdf/PyMuPDF

Hi,

after upgrading pymupdf from 1.18.4 to 1.18.5 I noticed that the following code doesn't work anymore:

page.showPDFpage(
    targetrect,  # fill the whole page
    self.doc,  # input document
    self.pagenr,  # input page number
    clip=sourcerect,  # part of the input page to use
)

It now fails with ValueError: bad number of positional parameters. Could you:

  • document that version 1.18.5 introduced a change so that others with similar code know that this is intentional
  • document how to port code from 1.18.4 to 1.18.5
  • in the future, not make a backwards-incompatible change on a minor version bump

Thanks!

bug

Most helpful comment

This is an error. Sorry about that - there was no change intended. As a hotfix please replace utils.py of your installation with this file:
utils.zip

All 3 comments

This is an error. Sorry about that - there was no change intended. As a hotfix please replace utils.py of your installation with this file:
utils.zip

No worries, thanks for the quick reply! :+1:

Fixed by new version currently being uploaded.

Was this page helpful?
0 / 5 - 0 ratings