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

Method get_page_pixmap

src/__init__.py:5115–5148  ·  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: pymupdf.Matrix for transformation (default: pymupdf.Identity). colorspace: (str,pymupdf.Colorspace

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

Source from the content-addressed store, hash-verified

5113 return numbers
5114
5115 def get_page_pixmap(
5116 doc: 'Document',
5117 pno: int,
5118 *,
5119 matrix: matrix_like = None,
5120 dpi=None,
5121 colorspace: Colorspace = None,
5122 clip: rect_like = None,
5123 alpha: bool = False,
5124 annots: bool = True,
5125 ) -> 'Pixmap':
5126 """Create pixmap of document page by page number.
5127
5128 Notes:
5129 Convenience function calling page.get_pixmap.
5130 Args:
5131 pno: (int) page number
5132 matrix: pymupdf.Matrix for transformation (default: pymupdf.Identity).
5133 colorspace: (str,pymupdf.Colorspace) rgb, rgb, gray - case ignored, default csRGB.
5134 clip: (irect-like) restrict rendering to this area.
5135 alpha: (bool) include alpha channel
5136 annots: (bool) also render annotations
5137 """
5138 if matrix is None:
5139 matrix = Identity
5140 if colorspace is None:
5141 colorspace = csRGB
5142 return doc[pno].get_pixmap(
5143 matrix=matrix,
5144 dpi=dpi, colorspace=colorspace,
5145 clip=clip,
5146 alpha=alpha,
5147 annots=annots
5148 )
5149
5150 def get_page_text(
5151 doc: 'Document',

Callers

nothing calls this directly

Calls 1

get_pixmapMethod · 0.45

Tested by

no test coverage detected