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

Method set_rotation

src/__init__.py:12974–12979  ·  view source on GitHub ↗

Set page rotation.

(self, rotation)

Source from the content-addressed store, hash-verified

12972 mupdf.pdf_dict_del( page.obj(), PDF_NAME('TrimBox'))
12973
12974 def set_rotation(self, rotation):
12975 """Set page rotation."""
12976 CheckParent(self)
12977 page = _as_pdf_page(self.this)
12978 rot = JM_norm_rotation(rotation)
12979 mupdf.pdf_dict_put_int( page.obj(), PDF_NAME('Rotate'), rot)
12980
12981 def set_trimbox(self, rect):
12982 """Set the TrimBox."""

Callers 15

add_caret_annotMethod · 0.95
add_circle_annotMethod · 0.95
add_file_annotMethod · 0.95
add_freetext_annotMethod · 0.95
add_ink_annotMethod · 0.95
add_line_annotMethod · 0.95
add_polygon_annotMethod · 0.95
add_polyline_annotMethod · 0.95
add_rect_annotMethod · 0.95
add_redact_annotMethod · 0.95
add_stamp_annotMethod · 0.95
add_text_annotMethod · 0.95

Calls 4

CheckParentFunction · 0.85
_as_pdf_pageFunction · 0.85
JM_norm_rotationFunction · 0.85
PDF_NAMEFunction · 0.85

Tested by 4

test_2812Function · 0.36
test_rotation1Function · 0.36
bbox_countFunction · 0.36
test_3400Function · 0.36