Index: /main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- /main/waeup.kofa/trunk/CHANGES.txt	(revision 16261)
+++ /main/waeup.kofa/trunk/CHANGES.txt	(revision 16262)
@@ -4,4 +4,7 @@
 1.6.1.dev0 (unreleased)
 =======================
+
+* Use Uli's marker substitution hack to inject signature
+  images into pdf files.
 
 * Implement `ExportPDFPersonalDataSlip` (without button
Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py	(revision 16261)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/pdf.py	(revision 16262)
@@ -23,4 +23,5 @@
 import os
 import pytz
+from string import Template
 from cStringIO import StringIO
 from datetime import datetime
@@ -559,4 +560,7 @@
     logo_left_pos = [0, 0, 0]
     pagesize = portrait(A4)
+
+    test_signature_img_path = os.path.join(
+        os.path.dirname(__file__), 'static', 'test_signature.png')
 
     @classmethod
@@ -823,4 +827,22 @@
         return
 
+    def _substitute_markers(self, text):
+        """If `text` contains some marker, substitute it.
+
+        Markers are standard library string template placeholders. See
+        https://docs.python.org/2/library/string.html and
+        `string.Template` for details. Roughly, placeholders look like
+        ``${some_marker}``.
+
+        Valid markers:
+           ``test_signature_img_path`` -- path to signature image stored in
+                                     `test_signature_img_path`` attribute.
+        """
+        text = Template(text)
+        PDF_SIGNATURES =  {
+            'test_signature_img_path': self.test_signature_img_path,
+            }
+        return text.safe_substitute(PDF_SIGNATURES)
+
     def create_pdf(self, data, headerline=None, title=None, author=None,
                    footer='', note=None, sigs_in_footer=[], topMargin=1.5,
@@ -849,4 +871,7 @@
         doc.letterhead_path = letterhead_path
         if note is not None:
+            # Inject signature images
+            note = self._substitute_markers(note)
+            # Format html
             html = format_html(note)
             data.append(Paragraph(html, NOTE_STYLE))
Index: /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 16261)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py	(revision 16262)
@@ -539,4 +539,18 @@
     form_fields = grok.AutoFields(IStudentBase).select('student_id', 'reg_number')
 
+
+    # Can be used for testing. Just replace 'post_text=None'
+    # by post_text=self.post_text'
+    post_text = '''
+Conratulations!
+
+
+<img src="${test_signature_img_path}" valign="-20" height="38" width="86" />
+
+
+John Tester
+- Registrar -
+'''
+
     @property
     def label(self):
@@ -554,5 +568,5 @@
         return students_utils.renderPDFAdmissionLetter(self,
             self.context.student, omit_fields=self.omit_fields,
-            letterhead_path=letterhead_path)
+            letterhead_path=letterhead_path, post_text=None)
 
 class StudentBaseManageFormPage(KofaEditFormPage):
