Ignore:
Timestamp:
8 Mar 2012, 16:30:34 (13 years ago)
Author:
Henrik Bettermann
Message:

Insert a br tag if widgets contain div tags which are not supported by reportlab.

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/pdf.py

    r7714 r7804  
    178178            f_label = Paragraph(f_label, style["Normal"])
    179179            f_text = '<font size=12>%s</font>' % widget()
     180            # Add br tag if widgets contain div tags
     181            # which are not supported by reportlab
     182            f_text = f_text.replace('</div>', '<br /></div>')
    180183            f_text = Paragraph(f_text, style["Normal"])
    181184            data.append([f_label,f_text])
  • main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py

    r7741 r7804  
    6767    utf-8 encoded (usually the case for widgets etc.).
    6868
     69    Finally, a br tag is added if widgets contain div tags
     70    which are not supported by reportlab.
     71
    6972    The returned snippet is unicode type.
    7073    """
     
    7477        else:
    7578            text = unicode(text)
     79    text = text.replace('</div>', '<br /></div>')
    7680    tag1 = u'<font color="%s" size="%d">' % (color, size)
    7781    return tag1 + u'%s</font>' % text
Note: See TracChangeset for help on using the changeset viewer.