Skip to content

Documentation: Mention PDF rotation in Page.show_pdf() documentation #5216

Closed

Description

@JLindop

Is your feature request related to a problem? Please describe.
I spent a few hours today trying to use Page.show_pdf_page() - my programme was working on some PDFs but not others. I eventually found that the breaking documents were all rotated in some way, and when I was trying to find a way to fix it, I found Page.remove_rotation(), whose documentation says that it "may come in handy when e.g. used with Page.show_pdf_page()". If I had known that show_pdf_page() does not automatically take rotation into account when I first started using it, it would have saved me a lot of debugging time.

Describe the solution you'd like
Some sort of warning or caveat in the show_pdf_page() documentation that suggests removing the rotation of the source page before placing it onto the destination. Perhaps the posterize.py demo could also utilise the function to teach developers about the potentially unexpected behaviour.

Describe alternatives you've considered
The two properties are next to each other in the documentation and arguably it's redundant to have them linking back to each-other when they're so close, but I completely ignored remove_rotation() when I was trying to use show_pdf_page() because I didn't realise that it was relevant to what I was doing, so a call-out would still have been useful. I didn't know that PDFs had rotation metadata until today, so it wasn't something I was considering until I had exhausted several other avenues.

Activity

  1. julian-smith-artifex-com commented on Nov 2, 2026

    @julian-smith-artifex-com
    Collaborator

    Fixed in PyMuPDF-2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions