def getPixmap(page, matrix = None, colorspace = csRGB, clip = None,<EOL>alpha = True):
CheckParent(page)<EOL>cs = colorspace<EOL>if type(colorspace) is str:<EOL><INDENT>if colorspace.upper() == "<STR_LIT>":<EOL><INDENT>cs = csGRAY<EOL><DEDENT>elif colorspace.upper() == "<STR_LIT>":<EOL><INDENT>cs = csCMYK<EOL><DEDENT>else:<EOL><INDENT>cs = csRGB<EOL><DEDENT><DEDENT>if cs.n not in (<NUM_LIT:1>,<NUM_LIT:3>,<NUM_LIT:4>):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>dl = page.getDisplayList()               <EOL>if clip:<EOL><INDENT>scissor = Rect(clip)<EOL><DEDENT>else:<EOL><INDENT>scissor = None<EOL><DEDENT>pix = dl.getPixmap(matrix = matrix,<EOL>colorspace = cs,<EOL>alpha = alpha,<EOL>clip = scissor)<EOL>del dl<EOL>return pix<EOL>
Create pixmap of page.

    Args:
        matrix: Matrix for transformation (default: Identity).
        colorspace: (str/Colorspace) rgb, rgb, gray - case ignored, default csRGB.
        clip: (irect-like) restrict rendering to this area.
        alpha: (bool) include alpha channel