Index: /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/batching.py
===================================================================
--- /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/batching.py	(revision 12383)
+++ /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/batching.py	(revision 12384)
@@ -24,5 +24,7 @@
 from ikobacustom.pcn.customers.interfaces import (
     IPCNCustomer,
-    IPCNCustomerDocument, IPCNContract)
+    IPCNCustomerJPGDocument,
+    IPCNCustomerPDFDocument,
+    IPCNContract)
 from ikobacustom.pcn.interfaces import MessageFactory as _
 
@@ -37,13 +39,21 @@
 
 
-class PCNCustomerDocumentProcessor(CustomerDocumentProcessorBase):
-    """A batch processor for IPCNCustomerDocument objects.
+class PCNCustomerJPGDocumentProcessor(CustomerDocumentProcessorBase):
+    """A batch processor for IPCNCustomerJPGDocument objects.
     """
-    util_name = 'pcncustomerdocumentprocessor'
+    util_name = 'pcncustomerjpgdocumentprocessor'
     grok.name(util_name)
-    name = _('PCN Customer Document Processor')
-    iface = IPCNCustomerDocument
-    factory_name = 'waeup.PCNCustomerDocument'
+    name = _('PCN Customer JPG Document Processor')
+    iface = IPCNCustomerJPGDocument
+    factory_name = 'waeup.PCNCustomerJPGDocument'
 
+class PCNCustomerPDFDocumentProcessor(CustomerDocumentProcessorBase):
+    """A batch processor for IPCNCustomerPDFDocument objects.
+    """
+    util_name = 'pcncustomerpdfdocumentprocessor'
+    grok.name(util_name)
+    name = _('PCN Customer PDF Document Processor')
+    iface = IPCNCustomerPDFDocument
+    factory_name = 'waeup.PCNCustomerPDFDocument'
 
 class PCNContractProcessor(ContractProcessorBase):
Index: /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/documents.py
===================================================================
--- /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/documents.py	(revision 12383)
+++ /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/documents.py	(revision 12384)
@@ -26,13 +26,14 @@
 from waeup.ikoba.customers.documents import CustomerDocumentBase
 from ikobacustom.pcn.interfaces import MessageFactory as _
-from ikobacustom.pcn.customers.interfaces import IPCNCustomerDocument
+from ikobacustom.pcn.customers.interfaces import (
+    IPCNCustomerJPGDocument, IPCNCustomerPDFDocument)
 
 
-class PCNCustomerDocument(CustomerDocumentBase):
+class PCNCustomerJPGDocument(CustomerDocumentBase):
     """This is a sample customer document.
     """
 
-    grok.implements(IPCNCustomerDocument, ICustomerNavigation)
-    grok.provides(IPCNCustomerDocument)
+    grok.implements(IPCNCustomerJPGDocument, ICustomerNavigation)
+    grok.provides(IPCNCustomerJPGDocument)
 
     # Ikoba can store any number of files per Document object.
@@ -40,23 +41,50 @@
     # only one file per Document object. Thus the following
     # tuple should contain only a single filename string.
-    filenames = ('sample',)
+    filenames = ('scan.jpg',)
 
-    form_fields_interface = IPCNCustomerDocument
+    form_fields_interface = IPCNCustomerJPGDocument
 
-PCNCustomerDocument = attrs_to_fields(PCNCustomerDocument)
+PCNCustomerJPGDocument = attrs_to_fields(PCNCustomerJPGDocument)
 
 
-# Customer documents must be importable. So we need a factory.
-class PCNCustomerDocumentFactory(grok.GlobalUtility):
+class PCNCustomerJPGDocumentFactory(grok.GlobalUtility):
     """A factory for customer documents.
     """
     grok.implements(IFactory)
-    grok.name(u'waeup.PCNCustomerDocument')
+    grok.name(u'waeup.PCNCustomerJPGDocument')
     title = u"Create a new document.",
-    description = u"This factory instantiates new sample document instances."
+    description = u"This factory instantiates new document instances."
 
     def __call__(self, *args, **kw):
-        return PCNCustomerDocument(*args, **kw)
+        return PCNCustomerJPGDocument(*args, **kw)
 
     def getInterfaces(self):
-        return implementedBy(PCNCustomerDocument)
+        return implementedBy(PCNCustomerJPGDocument)
+
+class PCNCustomerPDFDocument(CustomerDocumentBase):
+    """This is a sample customer document.
+    """
+
+    grok.implements(IPCNCustomerPDFDocument, ICustomerNavigation)
+    grok.provides(IPCNCustomerPDFDocument)
+
+    filenames = ('scan.pdf',)
+
+    form_fields_interface = IPCNCustomerPDFDocument
+
+PCNCustomerPDFDocument = attrs_to_fields(PCNCustomerPDFDocument)
+
+
+class PCNCustomerPDFDocumentFactory(grok.GlobalUtility):
+    """A factory for customer documents.
+    """
+    grok.implements(IFactory)
+    grok.name(u'waeup.PCNCustomerPDFDocument')
+    title = u"Create a new document.",
+    description = u"This factory instantiates new document instances."
+
+    def __call__(self, *args, **kw):
+        return PCNCustomerPDFDocument(*args, **kw)
+
+    def getInterfaces(self):
+        return implementedBy(PCNCustomerPDFDocument)
Index: /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/export.py
===================================================================
--- /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/export.py	(revision 12383)
+++ /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/export.py	(revision 12384)
@@ -22,5 +22,6 @@
     CustomerExporter, CustomerDocumentExporterBase, ContractExporterBase)
 from ikobacustom.pcn.customers.interfaces import (
-    IPCNCustomer, IPCNCustomerDocument, IPCNContract)
+    IPCNCustomer, IPCNCustomerJPGDocument,
+    IPCNCustomerPDFDocument, IPCNContract)
 from ikobacustom.pcn.interfaces import MessageFactory as _
 
@@ -32,11 +33,19 @@
 
 
-class PCNCustomerDocumentExporter(CustomerDocumentExporterBase):
+class PCNCustomerJPGDocumentExporter(CustomerDocumentExporterBase):
     """Exporter for documents.
     """
-    grok.name('pcncustomerdocuments')
-    iface = IPCNCustomerDocument
-    title = _(u'PCN Customer Documents')
-    class_name = 'PCNCustomerDocument'
+    grok.name('pcncustomerjpgdocuments')
+    iface = IPCNCustomerJPGDocument
+    title = _(u'PCN Customer JPG Documents')
+    class_name = 'PCNCustomerJPGDocument'
+
+class PCNCustomerPDFDocumentExporter(CustomerDocumentExporterBase):
+    """Exporter for documents.
+    """
+    grok.name('pcncustomerpdfdocuments')
+    iface = IPCNCustomerPDFDocument
+    title = _(u'PCN Customer PDF Documents')
+    class_name = 'PCNCustomerPDFDocument'
 
 
Index: /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/fileviewlets.py
===================================================================
--- /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/fileviewlets.py	(revision 12383)
+++ /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/fileviewlets.py	(revision 12384)
@@ -23,5 +23,6 @@
     FileDisplay, FileUpload, Image)
 
-from ikobacustom.pcn.customers.documents import PCNCustomerDocument
+from ikobacustom.pcn.customers.documents import (
+    PCNCustomerJPGDocument, PCNCustomerPDFDocument)
 
 from waeup.ikoba.customers.browser import (
@@ -35,9 +36,9 @@
 # File viewlets for customer documents
 
-class SampleScanManageUpload(FileUpload):
+class JPGScanManageUpload(FileUpload):
     """Scan upload viewlet for officers.
     """
     grok.order(1)
-    grok.context(PCNCustomerDocument)
+    grok.context(PCNCustomerJPGDocument)
     grok.view(DocumentManageFormPage)
     grok.require('waeup.manageCustomer')
@@ -45,9 +46,9 @@
     title = _(u'Sample Scan')
     mus = 1024 * 50
-    download_name = u'sample'
+    download_name = u'scan.jpg'
     tab_redirect = '#tab2'
 
 
-class SampleScanEditUpload(SampleScanManageUpload):
+class JPGScanEditUpload(JPGScanManageUpload):
     """Scan upload viewlet for customer.
     """
@@ -56,25 +57,25 @@
 
 
-class SampleScanDisplay(FileDisplay):
+class JPGScanDisplay(FileDisplay):
     """Scan display viewlet.
     """
     grok.order(1)
-    grok.context(PCNCustomerDocument)
+    grok.context(PCNCustomerJPGDocument)
     grok.require('waeup.viewCustomer')
     grok.view(DocumentDisplayFormPage)
     label = _(u'Sample Scan')
     title = _(u'Sample Scan')
-    download_name = u'sample'
+    download_name = u'scan.jpg'
 
 
-class SampleScanImage(Image):
+class JPGScanImage(Image):
     """Scan document.
     """
-    grok.name('sample')
-    grok.context(PCNCustomerDocument)
+    grok.name('scan.jpg')
+    grok.context(PCNCustomerJPGDocument)
     grok.require('waeup.viewCustomer')
-    download_name = u'sample'
+    download_name = u'scan.jpg'
 
-class SampleScanPDFSlip(SampleScanDisplay):
+class JPGScanPDFSlip(JPGScanDisplay):
     grok.view(PDFDocumentSlipPage)
 
@@ -84,10 +85,10 @@
     """
     grok.view(DocumentManageFormPage)
-    grok.context(PCNCustomerDocument)
+    grok.context(PCNCustomerPDFDocument)
     grok.require('waeup.manageCustomer')
     label = _(u'PDF File')
     title = _(u'PDF File')
     mus = 1024 * 200
-    download_name = u'sample.pdf'
+    download_name = u'scan.pdf'
     tab_redirect = '#tab2'
 
@@ -104,10 +105,10 @@
     """
     grok.order(1)
-    grok.context(PCNCustomerDocument)
+    grok.context(PCNCustomerPDFDocument)
     grok.require('waeup.viewCustomer')
     grok.view(DocumentDisplayFormPage)
     label = _(u'PDF Scan')
     title = _(u'PDF Scan')
-    download_name = u'sample.pdf'
+    download_name = u'scan.pdf'
 
 
@@ -115,8 +116,8 @@
     """Scan document.
     """
-    grok.name('sample.pdf')
-    grok.context(PCNCustomerDocument)
+    grok.name('scan.pdf')
+    grok.context(PCNCustomerPDFDocument)
     grok.require('waeup.viewCustomer')
-    download_name = u'sample.pdf'
+    download_name = u'scan.pdf'
 
 class PDFScanSlip(PDFScanDisplay):
Index: /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/interfaces.py
===================================================================
--- /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/interfaces.py	(revision 12383)
+++ /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/interfaces.py	(revision 12384)
@@ -19,5 +19,5 @@
 from zope import schema
 from waeup.ikoba.customers.interfaces import (
-    ICustomer, ICustomerDocument, IContract)
+    ICustomer, ICustomerDocument, ICustomerPDFDocument, IContract)
 from waeup.ikoba.customers.vocabularies import (
     ConCatProductSource, CustomerDocumentSource)
@@ -34,6 +34,11 @@
 
 
-class IPCNCustomerDocument(ICustomerDocument):
-    """A customer document.
+class IPCNCustomerJPGDocument(ICustomerDocument):
+    """A customer jpg document.
+
+    """
+
+class IPCNCustomerPDFDocument(ICustomerPDFDocument):
+    """A customer pdf document.
 
     """
Index: /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_browser.py
===================================================================
--- /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_browser.py	(revision 12383)
+++ /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_browser.py	(revision 12384)
@@ -32,9 +32,11 @@
 from ikobacustom.pcn.customers.export import (
     PCNCustomerExporter,
-    PCNCustomerDocumentExporter,
+    PCNCustomerPDFDocumentExporter,
+    PCNCustomerJPGDocumentExporter,
     PCNContractExporter)
 from ikobacustom.pcn.customers.batching import (
     PCNCustomerProcessor,
-    PCNCustomerDocumentProcessor,
+    PCNCustomerPDFDocumentProcessor,
+    PCNCustomerJPGDocumentProcessor,
     PCNContractProcessor)
 from ikobacustom.pcn.testing import FunctionalLayer, samples_dir
@@ -56,12 +58,16 @@
         IWorkflowState(customer).setState('started')
         self.app['customers'].addCustomer(customer)
-        document = createObject(u'waeup.PCNCustomerDocument')
-        document.title = u'My first document'
-        customer['documents'].addDocument(document)
+        document1 = createObject(u'waeup.PCNCustomerPDFDocument')
+        document1.title = u'My first document'
+        document2 = createObject(u'waeup.PCNCustomerJPGDocument')
+        document2.title = u'My second document'
+        customer['documents'].addDocument(document1)
+        customer['documents'].addDocument(document2)
         contract = createObject(u'waeup.PCNContract')
         contract.tc_dict = {'en':u'Hello World'}
         customer['contracts'].addContract(contract)
         self.customer = customer
-        self.document = document
+        self.document1 = document1
+        self.document2 = document2
         self.contract = contract
         self.outfile = os.path.join(self.workdir, 'myoutput.csv')
@@ -108,23 +114,23 @@
         return
 
-    def test_export_reimport_documents(self):
+    def test_export_reimport_pdf_documents(self):
         # we can export all documents in a portal
         # set values we can expect in export file
         self.setup_for_export()
-        exporter = PCNCustomerDocumentExporter()
+        exporter = PCNCustomerPDFDocumentExporter()
         exporter.export_all(self.app, self.outfile)
         result = open(self.outfile, 'rb').read()
         self.assertMatches(result,
             'class_name,document_id,history,state,title,user_id\r\n'
-            'PCNCustomerDocument,%s,'
+            'PCNCustomerPDFDocument,%s,'
             '[u\'2014-12-21 17:00:36 WAT - Document created by system\'],'
             'created,My first document,K1000000\r\n'
-            % self.document.document_id)
+            % self.document1.document_id)
         # We can reimport the file if we change the header (user_id -> customer_id)
-        processor = PCNCustomerDocumentProcessor()
+        processor = PCNCustomerPDFDocumentProcessor()
         open(self.outfile, 'wb').write(
             'customer_id,class_name,document_id,state,title\r\n'
-            'K1000000,PCNCustomerDocument,%s,started,My first title\r\n'
-            % self.document.document_id)
+            'K1000000,PCNCustomerPDFDocument,%s,started,My first title\r\n'
+            % self.document1.document_id)
         result = processor.doImport(
             self.outfile,
@@ -135,5 +141,49 @@
         self.assertEqual(num_fail,1)
         # We remove the original document.
-        del self.customer['documents'][self.document.document_id]
+        del self.customer['documents'][self.document1.document_id]
+        result = processor.doImport(
+            self.outfile,
+            ['customer_id','class_name','document_id','state','title'],
+            mode='create')
+        num_succ, num_fail, finished_path, failed_path = result
+        self.assertEqual(num_fail,0)
+        # We can import the same file in update mode.
+        result = processor.doImport(
+            self.outfile,
+            ['customer_id','class_name','document_id','state','title'],
+            mode='update')
+        num_succ, num_fail, finished_path, failed_path = result
+        self.assertEqual(num_succ,1)
+        self.assertEqual(num_fail,0)
+        return
+
+    def test_export_reimport_jpg_documents(self):
+        # we can export all documents in a portal
+        # set values we can expect in export file
+        self.setup_for_export()
+        exporter = PCNCustomerJPGDocumentExporter()
+        exporter.export_all(self.app, self.outfile)
+        result = open(self.outfile, 'rb').read()
+        self.assertMatches(result,
+            'class_name,document_id,history,state,title,user_id\r\n'
+            'PCNCustomerJPGDocument,%s,'
+            '[u\'2014-12-21 17:00:36 WAT - Document created by system\'],'
+            'created,My second document,K1000000\r\n'
+            % self.document2.document_id)
+        # We can reimport the file if we change the header (user_id -> customer_id)
+        processor = PCNCustomerJPGDocumentProcessor()
+        open(self.outfile, 'wb').write(
+            'customer_id,class_name,document_id,state,title\r\n'
+            'K1000000,PCNCustomerJPGDocument,%s,started,My second title\r\n'
+            % self.document2.document_id)
+        result = processor.doImport(
+            self.outfile,
+            ['customer_id','class_name','document_id','state','title'],
+            mode='create')
+        num, num_fail, finished_path, failed_path = result
+        # The object exists.
+        self.assertEqual(num_fail,1)
+        # We remove the original document.
+        del self.customer['documents'][self.document2.document_id]
         result = processor.doImport(
             self.outfile,
@@ -219,5 +269,5 @@
         self.browser.open(self.customer_path + '/documents')
         self.browser.getControl("Add document").click()
-        self.browser.getControl(name="doctype").value = ['PCNCustomerDocument']
+        self.browser.getControl(name="doctype").value = ['PCNCustomerPDFDocument']
         self.browser.getControl(name="form.title").value = 'My PCN Document'
         self.browser.getControl("Add document").click()
@@ -247,8 +297,8 @@
             name='upload_pdfscanmanageupload').click()
         self.assertTrue(
-            'href="http://localhost/app/customers/K1000000/documents/%s/sample.pdf">PDF File</a>'
+            'href="http://localhost/app/customers/K1000000/documents/%s/scan.pdf">PDF File</a>'
             % docid in self.browser.contents)
         # Browsing the link shows a real pdf
-        self.browser.open('sample.pdf')
+        self.browser.open('scan.pdf')
         self.assertEqual(
             self.browser.headers['content-type'], 'application/pdf')
Index: /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_document.py
===================================================================
--- /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_document.py	(revision 12383)
+++ /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/tests/test_document.py	(revision 12384)
@@ -29,6 +29,6 @@
 
 from ikobacustom.pcn.testing import (FunctionalLayer, FunctionalTestCase)
-from ikobacustom.pcn.customers.documents import PCNCustomerDocument
-from ikobacustom.pcn.customers.interfaces import IPCNCustomerDocument
+from ikobacustom.pcn.customers.documents import PCNCustomerPDFDocument
+from ikobacustom.pcn.customers.interfaces import IPCNCustomerPDFDocument
 
 
@@ -38,17 +38,17 @@
 
     def test_interfaces(self):
-        verify.verifyClass(IPCNCustomerDocument, PCNCustomerDocument)
-        verify.verifyClass(ICustomerNavigation, PCNCustomerDocument)
-        verify.verifyObject(IPCNCustomerDocument, PCNCustomerDocument())
-        verify.verifyObject(ICustomerNavigation, PCNCustomerDocument())
+        verify.verifyClass(IPCNCustomerPDFDocument, PCNCustomerPDFDocument)
+        verify.verifyClass(ICustomerNavigation, PCNCustomerPDFDocument)
+        verify.verifyObject(IPCNCustomerPDFDocument, PCNCustomerPDFDocument())
+        verify.verifyObject(ICustomerNavigation, PCNCustomerPDFDocument())
         return
 
     def test_addDocument(self):
         container = CustomerDocumentsContainer()
-        document = createObject(u'waeup.PCNCustomerDocument')
+        document = createObject(u'waeup.PCNCustomerPDFDocument')
         id = document.document_id
         container.addDocument(document)
         self.assertEqual(container[id], document)
         self.assertRaises(TypeError, container.addDocument, object())
-        self.assertEqual(document.class_name, 'PCNCustomerDocument')
+        self.assertEqual(document.class_name, 'PCNCustomerPDFDocument')
         return
Index: /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/utils.py
===================================================================
--- /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/utils.py	(revision 12383)
+++ /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/utils.py	(revision 12384)
@@ -47,5 +47,6 @@
         #'CustomerPDFDocument': _('PDF Document'),
 
-        'PCNCustomerDocument': _('PCN Document'),
+        'PCNCustomerJPGDocument': _('JPG Document'),
+        'PCNCustomerPDFDocument': _('PDF Document'),
         }
 
@@ -62,4 +63,5 @@
     EXPORTER_NAMES = (
         'customers',
-        'pcncustomerdocuments',
+        'pcncustomerjpgdocuments',
+        'pcncustomerpdfdocuments',
         'pcncontracts')
Index: /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/utils/utils.py
===================================================================
--- /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/utils/utils.py	(revision 12383)
+++ /main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/utils/utils.py	(revision 12384)
@@ -60,10 +60,12 @@
         'products',
         'customers',
-        'pcncustomerdocuments',
+        'pcncustomerjpgdocuments',
+        'pcncustomerpdfdocuments',
         'pcncontracts')
 
     BATCH_PROCESSOR_NAMES = (
         'pcncustomerprocessor',
-        'pcncustomerdocumentprocessor',
+        'pcncustomerjpgdocumentprocessor',
+        'pcncustomerpdfdocumentprocessor',
         'pcncontractprocessor',
         'pcnproductprocessor',
