MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / annot_preprocess

Function annot_preprocess

src/__init__.py:23679–23691  ·  view source on GitHub ↗

Prepare for annotation insertion on the page. Returns: Old page rotation value. Temporarily sets rotation to 0 when required.

(page: "Page")

Source from the content-addressed store, hash-verified

23677
23678
23679def annot_preprocess(page: "Page") -> int:
23680 """Prepare for annotation insertion on the page.
23681
23682 Returns:
23683 Old page rotation value. Temporarily sets rotation to 0 when required.
23684 """
23685 CheckParent(page)
23686 if not page.parent.is_pdf:
23687 raise ValueError("is no PDF")
23688 old_rotation = page.rotation
23689 if old_rotation != 0:
23690 page.set_rotation(0)
23691 return old_rotation
23692
23693
23694def annot_postprocess(page: "Page", annot: "Annot") -> None:

Callers 12

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

Calls 2

CheckParentFunction · 0.85
set_rotationMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…