Index: main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/browser.py
===================================================================
--- main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/browser.py	(revision 16664)
+++ main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/browser.py	(revision 16695)
@@ -17,4 +17,5 @@
 ##
 import grok
+import os
 from zope.i18n import translate
 from zope.schema.interfaces import ConstraintNotSatisfied
@@ -29,4 +30,5 @@
     StudentBasePDFFormPage, ExportPDFCourseRegistrationSlip,
     CourseTicketDisplayFormPage, StudentTriggerTransitionFormPage,
+    ExportPDFAdmissionSlip,
     msave, emit_lock_message)
 from waeup.kofa.students.interfaces import IStudentsUtils, ICourseTicket
@@ -46,2 +48,43 @@
 from kofacustom.edocons.interfaces import MessageFactory as _
 
+class CustomExportPDFAdmissionSlip(ExportPDFAdmissionSlip):
+    """Deliver a PDF Admission slip.
+    """
+
+    omit_fields = ('date_of_birth', 'current_level', 'current_mode',
+                   'certificate', 'faculty')
+    #form_fields = grok.AutoFields(IStudentBase).select('student_id', 'reg_number')
+
+    post_text = '''
+You are expected to proceed and pay your school fees of before the 12th of Nov. and on resumption you are to present a sworn affidavit on:
+
+1. Good behavior
+2. Renunciation of cultism
+
+Others are:
+
+1. Letter of sponsorship
+2. Acceptance letter
+
+Please visit the College Registry (student affairs division) for more enquiries.
+
+Congratulations!
+'''
+
+    @property
+    def label(self):
+        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
+        return translate(_('Admission Letter of'),
+            'waeup.kofa', target_language=portal_language) \
+            + ' %s' % self.context.display_fullname
+
+    def render(self):
+        students_utils = getUtility(IStudentsUtils)
+        letterhead_path = os.path.join(
+            os.path.dirname(__file__), 'static', 'letterhead_admission.jpg')
+        if not os.path.exists(letterhead_path):
+            letterhead_path = None
+        return students_utils.renderPDFAdmissionLetter(self,
+            self.context.student, omit_fields=self.omit_fields,
+            letterhead_path=letterhead_path, post_text=self.post_text)
+
Index: main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/tests/test_browser.py
===================================================================
--- main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/tests/test_browser.py	(revision 16664)
+++ main/kofacustom.edocons/trunk/src/kofacustom/edocons/students/tests/test_browser.py	(revision 16695)
@@ -31,4 +31,5 @@
 from waeup.kofa.students.accommodation import BedTicket
 from waeup.kofa.testing import FunctionalTestCase
+from waeup.kofa.browser.tests.test_pdf import samples_dir
 from waeup.kofa.interfaces import (
     IExtFileStore, IFileStoreNameChooser)
@@ -44,2 +45,26 @@
     def test_dummytest(self):
         return
+
+class StudentUITests(StudentsFullSetup):
+    # Tests for Student class views and pages
+
+    layer = FunctionalLayer
+
+    def test_student_admission_letters(self):
+        self.certificate.study_mode = 'ug_ft'
+        # Student cant login if their password is not set
+        IWorkflowInfo(self.student).fireTransition('admit')
+        self.browser.open(self.login_path)
+        self.browser.getControl(name="form.login").value = self.student_id
+        self.browser.getControl(name="form.password").value = 'spwd'
+        self.browser.getControl("Login").click()
+        self.assertMatches(
+            '...You logged in...', self.browser.contents)
+        self.browser.getLink("Base Data").click()
+        self.browser.getLink("Download admission letter").click()
+        self.assertEqual(self.browser.headers['Status'], '200 Ok')
+        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
+        path = os.path.join(samples_dir(), 'admission_slip.pdf')
+        open(path, 'wb').write(self.browser.contents)
+        print "Sample PDF UG admission_slip.pdf written to %s" % path
+ 
