Ignore:
Timestamp:
14 Jul 2015, 20:52:23 (9 years ago)
Author:
Henrik Bettermann
Message:

Prepare lists for pdf slips.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py

    r10595 r13169  
    113113    - remove newlines (not visible in HTML but visible in PDF)
    114114    - add <br> tags after <div> (as divs break lines in HTML but not in PDF)
     115    - replace <li> tags (as lists are not supported by reportlab)
    115116    If not html code:
    116117    - just replace newlines by <br> tags
    117118    """
    118119    if '</' in html:
    119         # Add br tag if widgets contain div tags
    120         # which are not supported by reportlab
    121120        html = html.replace('</div>', '</div><br />')
     121        html = html.replace('<li>', '- ')
     122        html = html.replace('</li>', '<br />')
    122123        html = html.replace('\n', '')
    123124    else:
Note: See TracChangeset for help on using the changeset viewer.