def extractTextWithSimpleLayout(analyzed_data):
    """
    Simple extraction of text from each page with basic layout support (1 group of text per page).
    Sample output object:
    [
        [   # New Page
            {   # New Text Group
                "text": ["Extracted Text Line 1", "2nd line here"],
                "type": "text",
                "layout": { # This is the box that bounds the text group
                    'x0': group.x0,
                    'x1': group.x1,
                    'y0': group.y0,
                    'y1': group.y1
                }
            }
        ]
    ]    
    """

    data = []
    for page in analyzed_data:
        if page.groups == None:
            continue

        data.append([])
        for group in page.groups:
            data[-1].append({
                    'text': group.get_text().split("\n"),
                    'layout': {
                        'x0': group.x0,
                        'x1': group.x1,
                        'y0': group.y0,
                        'y1': group.y1
                    }
            })

    return data