'Parses a P element and converts it into a format for ReportLab
@param html: the P element  to convert
@return: a list containing text that ReportLab can use'

def parse_p(self, html):

    font_sizes = {'p': 9, 'h1': 18, 'h2': 16, 'h3': 14, 'h4': 12, 'h5': 10, 'h6': 9}
    font_size = None
    title = False
    try:
        tag = html.tag
    except AttributeError:
        pass
    else:
        font_size = font_sizes.get(tag)
        title = (tag != 'p')
    style = (self.boldstyle if title else self.normalstyle)
    if font_size:
        default_font_size = style.fontSize
        style.fontSize = font_size
        style.spaceAfter = 8
    content = []
    select_tag = self.select_tag
    for component in html.components:
        result = select_tag(component, title=title)
        if (result != None):
            content += result
    if font_size:
        style.fontSize = default_font_size
    if (content == []):
        return None
    return content
