Index: main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 9549)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py	(revision 9551)
@@ -27,6 +27,7 @@
 from waeup.kofa.students.browser import (
     StudentClearPage, StudentRejectClearancePage,
-    StudyLevelEditFormPage,
+    StudyLevelEditFormPage, StudentBasePDFFormPage,
     msave, emit_lock_message)
+from waeup.kofa.students.interfaces import IStudentsUtils
 from waeup.kofa.students.workflow import FORBIDDEN_POSTGRAD_TRANS
 from kofacustom.nigeria.students.browser import (
@@ -36,6 +37,6 @@
     NigeriaOnlinePaymentAddFormPage,
     NigeriaExportPDFPaymentSlipPage,
+    NigeriaExportPDFClearanceSlipPage,
     )
-#from waeup.uniben.students.interfaces import ICustomStudent
 
 from waeup.uniben.students.interfaces import (
@@ -126,4 +127,17 @@
 #        return
 
+class CustomExportPDFClearanceSlipPage(NigeriaExportPDFClearanceSlipPage):
+    """Deliver a PDF slip of the context.
+    """
+
+    def render(self):
+        studentview = StudentBasePDFFormPage(self.context.student,
+            self.request, self.omit_fields)
+        students_utils = getUtility(IStudentsUtils)
+        return students_utils.renderPDF(
+            self, 'clearance_slip.pdf',
+            self.context.student, studentview, signatures=self._signatures(),
+            sig_in_footer=self._sigInFooter(), show_scans=False)
+
 class StudyCourseCOEditFormPage(KofaEditFormPage):
     """ Page to edit the student study course data by clearance officers.
Index: main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py
===================================================================
--- main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py	(revision 9549)
+++ main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py	(revision 9551)
@@ -207,73 +207,4 @@
         return None, payment
 
-    def renderPDF(self, view, filename='slip.pdf', student=None,
-                  studentview=None, tableheader=None, tabledata=None,
-                  note=None, signatures=None, sig_in_footer=False):
-        """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)
-        data = []
-        doc_title = view.label
-        author = '%s (%s)' % (view.request.principal.title,
-                              view.request.principal.id)
-        footer_text = view.label
-        if getattr(student, 'student_id', None) is not None:
-            footer_text = "%s - %s - " % (student.student_id, footer_text)
-
-        # Insert student data table
-        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
-        if student is not None:
-            bd_translation = trans(_('Base Data'), portal_language)
-            data.append(Paragraph(bd_translation, style["Heading3"]))
-            data.append(render_student_data(studentview))
-
-        # Insert widgets
-        if view.form_fields:
-            data.append(Paragraph(view.title, style["Heading3"]))
-            portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
-            separators = getattr(self, 'SEPARATORS_DICT', {})
-            table = creator.getWidgetsTable(
-                view.form_fields, view.context, None, lang=portal_language,
-                separators=separators)
-            data.append(table)
-
-        # Insert scanned docs
-        #data.extend(docs_as_flowables(view, portal_language))
-
-        # Insert history
-        if filename.startswith('clearance') or filename.startswith('course'):
-            hist_translation = trans(_('Workflow History'), portal_language)
-            data.append(Paragraph(hist_translation, style["Heading3"]))
-            data.extend(creator.fromStringList(student.history.messages))
-
-       # Insert content table (optionally on second page)
-        if tabledata and tableheader:
-            #data.append(PageBreak())
-            data.append(Spacer(1, 20))
-            data.append(Paragraph(view.content_title, style["Heading3"]))
-            contenttable = render_table_data(tableheader,tabledata)
-            data.append(contenttable)
-
-        # Insert signatures
-        if signatures and not sig_in_footer:
-            data.append(Spacer(1, 20))
-            signaturetable = get_signature_table(signatures)
-            data.append(signaturetable)
-
-        view.response.setHeader(
-            'Content-Type', 'application/pdf')
-        try:
-            pdf_stream = creator.create_pdf(
-                data, None, doc_title, author=author, footer=footer_text,
-                note=note, sig_in_footer=sig_in_footer)
-        except IOError:
-            view.flash('Error in image file.')
-            return view.redirect(view.url(view.context))
-        return pdf_stream
-
     # Uniben prefix
     STUDENT_ID_PREFIX = u'B'
