Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 9964)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 9965)
@@ -35,5 +35,6 @@
 from waeup.kofa.students.interfaces import IStudentsUtils
 from waeup.kofa.browser.pdf import (
-    ENTRY1_STYLE, format_html, NOTE_STYLE, HEADING_STYLE)
+    ENTRY1_STYLE, format_html, NOTE_STYLE, HEADING_STYLE, 
+    get_signature_tables)
 from waeup.kofa.browser.interfaces import IPDFCreator
 
@@ -201,68 +202,4 @@
     table = Table(data,colWidths=[
         element[2]*cm for element in tableheader], style=CONTENT_STYLE)
-    return table
-
-def get_signature_table(signatures, lang='en'):
-    """Return a list of one or more reportlab tables with signature fields.
-
-    Each signature will get a date field.
-
-    If more than three signatures have to be rendered, instead of a
-    list with one table a list of tables with one signature field each
-    will be returned.
-    """
-    style = getSampleStyleSheet()
-    space_width = 0.4  # width in cm of space between signatures
-    table_width = 16.0 # supposed width of signature table in cms
-    # width of signature cells in cm...
-    sig_col_width = table_width - ((len(signatures) - 1) * space_width)
-    sig_col_width = sig_col_width / len(signatures)
-    data = []
-    col_widths = [] # widths of columns
-
-    sig_style = [
-        ('VALIGN',(0,-1),(-1,-1),'TOP'),
-        #('FONT', (0,0), (-1,-1), 'Helvetica-BoldOblique', 12),
-        ('BOTTOMPADDING', (0,0), (-1,0), 36),
-        ('TOPPADDING', (0,-1), (-1,-1), 0),
-        ]
-
-    col_widths = [sig_col_width*cm, space_width*cm] * len(signatures)
-    if len(signatures) == 1 or len(signatures) > 3:
-        col_widths = [table_width*0.66*cm, table_width*0.34*cm]
-
-    row = []
-    if len(signatures) < 4:
-        # draw several signature fields in a row
-        for num, signature in enumerate(signatures):
-            # draw a line above each signature cell (not: empty cells
-            # in between)
-            sig_style.append(
-                ('LINEABOVE', (num*2,-1), (num*2, -1), 1, colors.black))
-            row.append(Paragraph(trans(_('Date:'), lang), ENTRY1_STYLE))
-            row.append('') # space col
-        data.append(row[:-1])
-        data.extend(([''],)*2) # insert 2 empty rows...
-        row = []
-        for signature in signatures:
-            row.append(Paragraph(trans(signature, lang), ENTRY1_STYLE))
-            row.append('')
-        data.append(row[:-1])
-    else:
-        # Draw each signature field one under another (vertically)
-        for num, signature in enumerate(signatures):
-            line = len(data)
-            sig_style.extend((
-                ('TOPPADDING', (0, line), (-1, line), 32),
-                ('BOTTOMPADDING', (0, line), (-1, line), 2),
-                ('LINEABOVE', (0, line+1), (0, line+1), 1, colors.black),
-                ('SPAN', (0, line+1), (1, line+1)),
-                ))
-            data.append(['', ''])
-            row.append(Paragraph(trans(signature, lang), ENTRY1_STYLE))
-            data.append(row)
-            row = []
-    table = Table(data, style=sig_style, repeatRows=len(data),
-                  colWidths=col_widths)
     return table
 
@@ -673,8 +610,11 @@
 
         # Insert signatures
+        # XXX: We are using only sigs_in_footer in waeup.kofa, so we
+        # do not have a test for the following lines.
         if signatures and not sigs_in_footer:
             data.append(Spacer(1, 20))
-            signaturetable = get_signature_table(signatures)
-            data.append(signaturetable)
+            signaturetables = get_signature_tables(signatures)
+            for table in signaturetables:
+                data.append(table)
 
         view.response.setHeader(
