Index: main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 9907)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py	(revision 9910)
@@ -33,4 +33,7 @@
 from waeup.kofa.interfaces import MessageFactory as _
 from waeup.kofa.students.interfaces import IStudentsUtils
+from waeup.kofa.browser.pdf import (
+    ENTRY1_STYLE, format_html, NOTE_STYLE, HEADING_STYLE)
+from waeup.kofa.browser.interfaces import IPDFCreator
 
 SLIP_STYLE = [
@@ -53,5 +56,5 @@
 
 def formatted_label(color=FONT_COLOR, size=FONT_SIZE):
-    tag1 ='<font color=%s size=%d>' % (color, size)
+    tag1 ='<font color=%s>' % (color)
     return tag1 + '%s:</font>'
 
@@ -90,5 +93,5 @@
     text = translate(text, 'zope', target_language=portal_language)
     text = text.replace('</div>', '<br /></div>')
-    tag1 = u'<font color="%s" size="%d">' % (color, size)
+    tag1 = u'<font color="%s">' % (color)
     return tag1 + u'%s</font>' % text
 
@@ -125,7 +128,7 @@
 
     f_label = formatted_label(size=12) % _('Name')
-    f_label = Paragraph(f_label, style["Normal"])
+    f_label = Paragraph(f_label, ENTRY1_STYLE)
     f_text = formatted_text(studentview.context.display_fullname, size=12)
-    f_text = Paragraph(f_text, style["Normal"])
+    f_text = Paragraph(f_text, ENTRY1_STYLE)
     data_right.append([f_label,f_text])
 
@@ -136,41 +139,41 @@
             widget.label.strip(), 'waeup.kofa',
             target_language=portal_language)
-        f_label = Paragraph(f_label, style["Normal"])
+        f_label = Paragraph(f_label, ENTRY1_STYLE)
         f_text = formatted_text(widget(), size=12)
-        f_text = Paragraph(f_text, style["Normal"])
+        f_text = Paragraph(f_text, ENTRY1_STYLE)
         data_right.append([f_label,f_text])
 
     if getattr(studentview.context, 'certcode', None):
         f_label = formatted_label(size=12) % _('Study Course')
-        f_label = Paragraph(f_label, style["Normal"])
+        f_label = Paragraph(f_label, ENTRY1_STYLE)
         f_text = formatted_text(
             studentview.context['studycourse'].certificate.longtitle(), size=12)
-        f_text = Paragraph(f_text, style["Normal"])
+        f_text = Paragraph(f_text, ENTRY1_STYLE)
         data_right.append([f_label,f_text])
 
         f_label = formatted_label(size=12) % _('Department')
-        f_label = Paragraph(f_label, style["Normal"])
+        f_label = Paragraph(f_label, ENTRY1_STYLE)
         f_text = formatted_text(
             studentview.context[
             'studycourse'].certificate.__parent__.__parent__.longtitle(),
             size=12)
-        f_text = Paragraph(f_text, style["Normal"])
+        f_text = Paragraph(f_text, ENTRY1_STYLE)
         data_right.append([f_label,f_text])
 
         f_label = formatted_label(size=12) % _('Faculty')
-        f_label = Paragraph(f_label, style["Normal"])
+        f_label = Paragraph(f_label, ENTRY1_STYLE)
         f_text = formatted_text(
             studentview.context[
             'studycourse'].certificate.__parent__.__parent__.__parent__.longtitle(),
             size=12)
-        f_text = Paragraph(f_text, style["Normal"])
+        f_text = Paragraph(f_text, ENTRY1_STYLE)
         data_right.append([f_label,f_text])
 
         f_label = formatted_label(size=12) % _('Entry Session')
-        f_label = Paragraph(f_label, style["Normal"])
+        f_label = Paragraph(f_label, ENTRY1_STYLE)
         entry_session = studentview.context['studycourse'].entry_session
         entry_session = academic_sessions_vocab.getTerm(entry_session).title
         f_text = formatted_text(entry_session, size=12)
-        f_text = Paragraph(f_text, style["Normal"])
+        f_text = Paragraph(f_text, ENTRY1_STYLE)
         data_right.append([f_label,f_text])
 
@@ -217,5 +220,5 @@
     sig_style = [
         ('VALIGN',(0,-1),(-1,-1),'TOP'),
-        ('FONT', (0,0), (-1,-1), 'Helvetica-BoldOblique', 12),
+        #('FONT', (0,0), (-1,-1), 'Helvetica-BoldOblique', 12),
         ('BOTTOMPADDING', (0,0), (-1,0), 36),
         ('TOPPADDING', (0,-1), (-1,-1), 0),
@@ -228,5 +231,5 @@
     row = []
     for signature in signatures:
-        row.append(trans(_('Date:'), lang))
+        row.append(Paragraph(trans(_('Date:'), lang), ENTRY1_STYLE))
         row.append('')
         if len(signatures) > 1:
@@ -236,8 +239,8 @@
             row.append('') # empty spaceholder on right
     data.append(row[:-1])
-    data.extend(([''],)*3) # insert 3 empty rows...
+    data.extend(([''],)*2) # insert 2 empty rows...
     row = []
     for signature in signatures:
-        row.append(Paragraph(trans(signature, lang), style["Normal"]))
+        row.append(Paragraph(trans(signature, lang), ENTRY1_STYLE))
         row.append('')
     data.append(row[:-1])
@@ -252,5 +255,4 @@
     from waeup.kofa.students.viewlets import FileManager
     from waeup.kofa.browser import DEFAULT_IMAGE_PATH
-    from waeup.kofa.browser.pdf import NORMAL_STYLE, ENTRY1_STYLE
     style = getSampleStyleSheet()
     data = []
@@ -261,5 +263,5 @@
     if fm.viewlets:
         sc_translation = trans(_('Scanned Documents'), lang)
-        data.append(Paragraph(sc_translation, style["Heading3"]))
+        data.append(Paragraph(sc_translation, HEADING_STYLE))
         # Insert list of scanned documents
         table_data = []
@@ -503,7 +505,4 @@
         """Render pdf admission letter.
         """
-        # XXX: we have to fix the import problems here.
-        from waeup.kofa.browser.interfaces import IPDFCreator
-        from waeup.kofa.browser.pdf import format_html, NOTE_STYLE
         if student is None:
             return
@@ -559,7 +558,4 @@
         """Render pdf slips for various pages.
         """
-        # XXX: we have to fix the import problems here.
-        from waeup.kofa.browser.interfaces import IPDFCreator
-        from waeup.kofa.browser.pdf import NORMAL_STYLE, ENTRY1_STYLE
         style = getSampleStyleSheet()
         creator = getUtility(IPDFCreator)
@@ -576,10 +572,10 @@
         if student is not None:
             bd_translation = trans(_('Base Data'), portal_language)
-            data.append(Paragraph(bd_translation, style["Heading3"]))
+            data.append(Paragraph(bd_translation, HEADING_STYLE))
             data.append(render_student_data(studentview))
 
         # Insert widgets
         if view.form_fields:
-            data.append(Paragraph(view.title, style["Heading3"]))
+            data.append(Paragraph(view.title, HEADING_STYLE))
             portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
             separators = getattr(self, 'SEPARATORS_DICT', {})
@@ -594,7 +590,7 @@
 
         # Insert history
-        if filename.startswith('clearance') or filename.startswith('course'):
+        if filename.startswith('clearance'):
             hist_translation = trans(_('Workflow History'), portal_language)
-            data.append(Paragraph(hist_translation, style["Heading3"]))
+            data.append(Paragraph(hist_translation, HEADING_STYLE))
             data.extend(creator.fromStringList(student.history.messages))
 
@@ -602,6 +598,6 @@
         if tabledata_1 and tableheader_1:
             #data.append(PageBreak())
-            data.append(Spacer(1, 20))
-            data.append(Paragraph(view.content_title_1, style["Heading3"]))
+            #data.append(Spacer(1, 20))
+            data.append(Paragraph(view.content_title_1, HEADING_STYLE))
             data.append(Spacer(1, 8))
             contenttable = render_table_data(tableheader_1,tabledata_1)
@@ -611,6 +607,6 @@
         if tabledata_2 and tableheader_2:
             #data.append(PageBreak())
-            data.append(Spacer(1, 20))
-            data.append(Paragraph(view.content_title_2, style["Heading3"]))
+            #data.append(Spacer(1, 20))
+            data.append(Paragraph(view.content_title_2, HEADING_STYLE))
             data.append(Spacer(1, 8))
             contenttable = render_table_data(tableheader_2,tabledata_2)
