MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / JM_page_rotation

Function JM_page_rotation

src/__init__.py:21037–21046  ·  view source on GitHub ↗

return a PDF page's /Rotate value: one of (0, 90, 180, 270)

(page)

Source from the content-addressed store, hash-verified

21035
21036
21037def JM_page_rotation(page):
21038 '''
21039 return a PDF page's /Rotate value: one of (0, 90, 180, 270)
21040 '''
21041 rotate = 0
21042
21043 obj = mupdf.pdf_dict_get_inheritable( page.obj(), mupdf.PDF_ENUM_NAME_Rotate)
21044 rotate = mupdf.pdf_to_int(obj)
21045 rotate = JM_norm_rotation(rotate)
21046 return rotate
21047
21048
21049def JM_pdf_obj_from_str(doc, src):

Callers 3

rotationMethod · 0.85
JM_rotate_page_matrixFunction · 0.85
Page__add_text_markerFunction · 0.85

Calls 1

JM_norm_rotationFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…