Index: main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 7278)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/tests/test_browser.py	(revision 7280)
@@ -510,6 +510,12 @@
             '<img align="middle" height="125px" src="passport.jpg" />'
             in self.browser.contents)
-
-        # The clearance slip can't yet be opened
+        # The clearance slip can't be opened because it requires a proper
+        # passport jpg file.
+        self.browser.open(self.student_path + '/clearance.pdf')
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertTrue('Error in image file' in self.browser.contents)
+        # We remove the passport file again
+        self.browser.open(self.manage_student_path)
+        self.browser.getControl('Delete').click()
         self.browser.open(self.student_path + '/clearance.pdf')
         self.assertEqual(self.browser.headers['Status'], '200 Ok')
Index: main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py	(revision 7278)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py	(revision 7280)
@@ -28,5 +28,7 @@
     Table, Spacer)
 from reportlab.platypus.tables import TableStyle
+from zope.component import getUtility
 from zope.formlib.form import setUpEditWidgets
+from waeup.sirp.interfaces import IExtFileStore
 from waeup.sirp.students.interfaces import IStudentsUtils
 
@@ -63,4 +65,13 @@
     data = []
     style = getSampleStyleSheet()
+    img = getUtility(IExtFileStore).getFileByContext(
+        studentview.context, attr='passport.jpg')
+    #import pdb; pdb.set_trace()
+    if img is None:
+        from waeup.sirp.browser import DEFAULT_PASSPORT_IMAGE_PATH
+        img = open(DEFAULT_PASSPORT_IMAGE_PATH, 'rb')
+    doc_img = Image(img.name, width=4*cm, height=3*cm, kind='bound')
+    data.append([doc_img])
+    data.append([Spacer(1, 12)])
     for widget in studentview.widgets:
         if widget.name == 'form.adm_code':
@@ -164,8 +175,8 @@
         #story.append(HRFlowable())
         if student:
-            story.append(Spacer(1, 18))
+            story.append(Spacer(1, 12))
             studenttable = render_student_data(student, studentview)
             story.append(studenttable)
-        story.append(Spacer(1, 18))
+        story.append(Spacer(1, 12))
         set_up_widgets(view)
         data = []
@@ -176,8 +187,35 @@
             f_text = Paragraph(f_text, style["Normal"])
             data.append([f_label,f_text])
+        # First, import browser components locally
+        # to avoid circular import
+        from waeup.sirp.students.viewlets import FileManager
+        from waeup.sirp.browser import DEFAULT_IMAGE_PATH
+        fm = FileManager(view.context, view.request, view)
+        # Collect viewlets
+        fm.update()
+        # Insert list of scanned documents
+        for viewlet in fm.viewlets:
+            f_label = '<font size=12>%s</font>' % viewlet.label
+            f_label = Paragraph(f_label, style["Normal"])
+            if viewlet.template.__grok_name__ == 'imagedisplay':
+                # In case we define FileDisplay viewlets with
+                # an imagedisplay template in the customization package
+                img = getUtility(IExtFileStore).getFileByContext(
+                    view.context, attr=viewlet.download_name)
+                if img is None:
+                    img = open(DEFAULT_IMAGE_PATH, 'rb')
+                doc_img = Image(img.name, width=2*cm, height=1*cm, kind='bound')
+                data.append([f_label,doc_img])
+            else:
+                f_text = '<font size=12>%s</font>' % viewlet.title
+                f_text = Paragraph(f_text, style["Normal"])
+                data.append([f_label,f_text])
         table = Table(data,style=SLIP_STYLE)
         story.append(table)
-        frame_body.addFromList(story,pdf)
-
+        try:
+            frame_body.addFromList(story,pdf)
+        except IOError:
+            view.flash('Error in image file.')
+            return view.redirect(view.url(view.context))
         story = []
         frame_footer = Frame(1*cm,0,width-(2*cm),1*cm)
@@ -186,5 +224,4 @@
         story.append(Paragraph(f_text, style["Normal"]))
         frame_footer.addFromList(story,pdf)
-
         view.response.setHeader(
             'Content-Type', 'application/pdf')
Index: main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py	(revision 7278)
+++ main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py	(revision 7280)
@@ -29,5 +29,5 @@
     StudentClearanceDisplayFormPage, StudentClearanceManageFormPage,
     write_log_message, StudentBaseManageFormPage, StudentBaseDisplayFormPage,
-    StudentFilesUploadPage)
+    StudentFilesUploadPage, ExportPDFClearanceSlipPage)
 from waeup.sirp.students.interfaces import IStudent, IStudentClearance
 
@@ -377,4 +377,7 @@
     download_name = u'birth_certificate'
 
+class BirthCertificateSlip(BirthCertificateDisplay):
+    grok.view(ExportPDFClearanceSlipPage)
+
 class BirthCertificateUpload(FileUpload):
     """Birth Certificate upload viewlet.
@@ -394,4 +397,7 @@
     title = u'Acceptance Letter Scan'
     download_name = u'acceptance_letter'
+
+class AcceptanceLetterSlip(AcceptanceLetterDisplay):
+    grok.view(ExportPDFClearanceSlipPage)
 
 class AcceptanceLetterUpload(FileUpload):
