Skip to content

Commit

Permalink
Return rotation zero for all non-PDF documents
Browse files Browse the repository at this point in the history
Use success of fz_page conversion to pdf_page as an indicator for rotation = 0.
  • Loading branch information
JorjMcKie committed Dec 27, 2023
1 parent 4675b84 commit 80d8588
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9247,7 +9247,7 @@ def rotation(self):
"""Page rotation."""
CheckParent(self)
page = self.this if isinstance(self.this, mupdf.PdfPage) else mupdf.pdf_page_from_fz_page(self.this)
if not page:
if not page.m_internal:
return 0
return JM_page_rotation(page)

Expand Down

0 comments on commit 80d8588

Please sign in to comment.