def getTextBlocks(page, images=False):
CheckParent(page)<EOL>dl = page.getDisplayList()<EOL>flags = TEXT_PRESERVE_LIGATURES | TEXT_PRESERVE_WHITESPACE<EOL>if images:<EOL><INDENT>flags |= TEXT_PRESERVE_IMAGES<EOL><DEDENT>tp = dl.getTextPage(flags)<EOL>l = tp._extractTextBlocks_AsList()<EOL>del tp<EOL>del dl<EOL>return l<EOL>
Return the text blocks on a page.

    Notes:
        Lines in a block are concatenated with line breaks.
    Args:
        images: (bool) also return meta data of any images.
        Image data are never returned with this method.
    Returns:
        A list of the blocks. Each item contains the containing rectangle coordinates,
        text lines, block type and running block number.