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

Function get_page_pixmap

src_classic/utils.py:922–952  ·  view source on GitHub ↗

Create pixmap of document page by page number. Notes: Convenience function calling page.get_pixmap. Args: pno: (int) page number matrix: Matrix for transformation (default: Identity). colorspace: (str,Colorspace) rgb, rgb, gray - case ignored, default csRGB.

(
    doc: Document,
    pno: int,
    *,
    matrix: matrix_like = Identity,
    dpi=None,
    colorspace: Colorspace = csRGB,
    clip: rect_like = None,
    alpha: bool = False,
    annots: bool = True,
)

Source from the content-addressed store, hash-verified

920
921
922def get_page_pixmap(
923 doc: Document,
924 pno: int,
925 *,
926 matrix: matrix_like = Identity,
927 dpi=None,
928 colorspace: Colorspace = csRGB,
929 clip: rect_like = None,
930 alpha: bool = False,
931 annots: bool = True,
932) -> Pixmap:
933 """Create pixmap of document page by page number.
934
935 Notes:
936 Convenience function calling page.get_pixmap.
937 Args:
938 pno: (int) page number
939 matrix: Matrix for transformation (default: Identity).
940 colorspace: (str,Colorspace) rgb, rgb, gray - case ignored, default csRGB.
941 clip: (irect-like) restrict rendering to this area.
942 alpha: (bool) include alpha channel
943 annots: (bool) also render annotations
944 """
945 return doc[pno].get_pixmap(
946 matrix=matrix,
947 dpi=dpi,
948 colorspace=colorspace,
949 clip=clip,
950 alpha=alpha,
951 annots=annots,
952 )
953
954
955def getLinkDict(ln) -> dict:

Callers

nothing calls this directly

Calls 1

get_pixmapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…