Index: main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/filedisplay.pt
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/filedisplay.pt	(revision 12446)
+++ main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/filedisplay.pt	(revision 12447)
@@ -5,5 +5,5 @@
   <td>
     <a tal:attributes="href python: view.url(context, viewlet.download_name)"
-       tal:content="viewlet/download_name"
+       tal:content="viewlet/download_filename"
        target="image">
       LINK
Index: main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/fileupload.pt
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/fileupload.pt	(revision 12446)
+++ main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/fileupload.pt	(revision 12447)
@@ -7,5 +7,5 @@
     <tal:file tal:condition="viewlet/file_exists">
       <a tal:attributes="href python: view.url(context, viewlet.download_name)"
-         tal:content="viewlet/title"
+         tal:content="viewlet/download_filename"
          target="image">
         LINK
Index: main/waeup.kofa/trunk/src/waeup/kofa/documents/fileviewlets.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/documents/fileviewlets.py	(revision 12446)
+++ main/waeup.kofa/trunk/src/waeup/kofa/documents/fileviewlets.py	(revision 12447)
@@ -44,4 +44,8 @@
     tab_redirect = '#tab2'
 
+    @property
+    def download_filename(self):
+        return u"%s.pdf" % self.context.document_id
+
 
 class PDFScanDisplay(FileDisplay):
@@ -56,4 +60,8 @@
     download_name = u'sample.pdf'
 
+    @property
+    def download_filename(self):
+        return u"%s.pdf" % self.context.document_id
+
 
 class PDFScanImage(UtilityView, Image):
@@ -66,4 +74,8 @@
     download_name = u'sample.pdf'
 
+    @property
+    def download_filename(self):
+        return self.context.document_id
+
     def update(self):
         if self.context.state != PUBLISHED:
Index: main/waeup.kofa/trunk/src/waeup/kofa/documents/tests/test_browser.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/documents/tests/test_browser.py	(revision 12446)
+++ main/waeup.kofa/trunk/src/waeup/kofa/documents/tests/test_browser.py	(revision 12447)
@@ -148,5 +148,5 @@
             name='upload_pdfscanmanageupload').click()
         self.assertTrue(
-            'href="http://localhost/app/documents/DOC1/sample.pdf">PDF File</a>'
+            'href="http://localhost/app/documents/DOC1/sample.pdf">DOC1.pdf</a>'
             in self.browser.contents)
         # The file can be found in the file system
@@ -159,5 +159,5 @@
         # Browsing the link shows a real pdf only if the document
         # has been published
-        self.browser.getLink("PDF File").click()
+        self.browser.getLink("DOC1.pdf").click()
         self.assertTrue(
             'The document requested has not yet been published'
@@ -167,4 +167,8 @@
         self.assertEqual(
             self.browser.headers['content-type'], 'application/pdf')
+        # The name of the downloaded file will be different
+        self.assertEqual(
+            self.browser.headers['Content-Disposition'],
+            'attachment; filename="DOC1.pdf')
 
         # Transitions can be performed
Index: main/waeup.kofa/trunk/src/waeup/kofa/students/fileviewlets.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/students/fileviewlets.py	(revision 12446)
+++ main/waeup.kofa/trunk/src/waeup/kofa/students/fileviewlets.py	(revision 12447)
@@ -120,5 +120,8 @@
     label = _(u'File')
     title = _(u'Scan')
-    download_name = u'filename.jpg'
+
+    @property
+    def download_filename(self):
+        return self.download_name
 
     @property
@@ -241,8 +244,10 @@
     """
     grok.baseclass()
-    grok.name('none.jpg')
     grok.context(IStudent)
     grok.require('waeup.viewStudent')
-    download_name = u'none.jpg'
+
+    @property
+    def download_filename(self):
+        return self.download_name
 
     def render(self):
@@ -262,8 +267,10 @@
         elif ext == '.png':
             self.response.setHeader('Content-Type', 'image/png')
+        elif ext == '.tif':
+            self.response.setHeader('Content-Type', 'image/tiff')
         elif ext == '.pdf':
             self.response.setHeader('Content-Type', 'application/pdf')
-        elif ext == '.tif':
-            self.response.setHeader('Content-Type', 'image/tiff')
+            self.response.setHeader('Content-Disposition',
+                'attachment; filename="%s.pdf' % self.download_filename)
         return image
 
