Ignore:
Timestamp:
14 Nov 2018, 06:47:23 (6 years ago)
Author:
Henrik Bettermann
Message:

Use built-in column width sizing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r15239 r15241  
    10351035        pdf_data.append(Spacer(1, 20))
    10361036        colwidth = colWidths=[None] * len(data[0][0])
    1037         # Adjust size of the first 4 columns.
    1038         maxlength = [0,0,0,0]
    1039         for line in data[0]:
    1040             for i in range(4):
    1041                 if len(line[i]) > maxlength[i]:
    1042                     maxlength[i] = len(line[i])
    1043         for i in range(4):
    1044             colwidth[i] = maxlength[i] * 0.225 * cm
    10451037        pdf_data += [Table(data[0], colwidth, style=CONTENT_STYLE)]
    10461038        # Process title if too long
Note: See TracChangeset for help on using the changeset viewer.