Aller à : navigation, rechercher

Maarch Capture Connector/MCC Server en 1.1

Version: 1.1 Stable

Release date: 2011/06/13


This is Maarch Capture Connector Server. It is intended to work with Maarch Capture Connector Client.


Maarch Capture Connector (MCC) is the replacement for Maarch Scansnap Connector (MSC). MSC has been entirely rewritten in PHP. There are multiple reasons for that :

  • Because of its name, MSC was (too) often considered to be only compatible with Fujitsu Scansnap scanners
  • It was written in VB6, which is neither free (as in "free speech"), nor supported by Microsoft
  • It was not portable

So here is the good news:

  • MCC is fully compatible with any scanner, and any PDF-Generators (such as `PDF Creator`_)
  • MCC can (in theory) work on Windows, Linux and MacOS X
  • It has some great new features :
 * Support for Proxies
 * Support for secured protocol (HTTPS)
 * A new "Form Mode": if enabled, you will be prompted for a few basic information after your document is scanned, and before it is sent to the server. You can set the form with form.xml
 * A new mass upload mode: upload several documents to the server at once. You can prepare the stream for mass import AutoImport using the file structrure.xml

.. _PDF Creator:

Package structure

File listing for the MCC Server::

 |-- config/
 |    -- config_mass.xml.default   # A sample config file for MCC server with mass scan mode
 |    -- config_mcc.xml.default    # A sample config file for MCC server with entreprise application
 |    -- config_mlb.xml.default    # A sample config file for MCC server with letterbox application
 |    -- form.dtd                  # DTD of form.xml
 |    -- form.xml.default          # A sample form for entreprise application
 |    -- form_mlb.xml.default      # A sample form for letterbox application
 |    -- structure.xml.default     # A sample structure AutoImport for entreprise application
 |    -- structure_mlb.xml.default # A sample structure AutoImport for letterbox application
 |-- outcome/                      # In mass scan mode, processed files are 
 |                                 #    backed up here
 |-- logs/
 |-- class_db.php                  # Class to handle connections to the database
 |-- get_datas.php                 # Script to exchange informations with MCC Client
 |-- mcc_server.php                # Main script


1. Extract this archive on your server. It must be available through the web, so place it in the www-root of your server.

2. Copy config/config_XXX.xml.default to config/config_XXX.xml

3. Edit config_XXX.xml, and set it up according to your environment

4. If you want to use form mode and/or mass upload, you have to copy and set config/form_XXX.xml.default and config/structure_XXX.xml.default to config/form_XXX.xml and config/structure_XXX.xml.Then you must set up Maarch AutoImport to inject documents from the outcome folder into the application database. In single document mode, you do not need this step.

Configuration details

Set up config_XXX.xml

Main configuration is done in the <CONFIG> section. Here are the available configuration tags :

  • CONFIG_NAME: The name of the config -> config_XXX.xml, You must enter XXX in the tag CONFIG_NAME
  • MCC_PATH: The path to the folder you install MCC Server in.
 ex: C:\\xampp\\htdocs\\MCC_server\\
  • MAARCH_TMP_PATH: Path to the tmp folder of your application. You can find this path in the main config.xml of any Maarch application.
 ex: C:\\xampp\\htdocs\\entreprise\\apps\\maarch_entreprise\\tmp\\
  • TARGET_PATH: The folder where the MCC Server copies the files it receives
 ex: C:\\xampp\\htdocs\\mcc\\server\\outcome\\
  • FORM: the path of the form configuration file (only on form mode or mass upload)
 ex: C:\\xampp\\htdocs\\MCC_server\\config\\form_XXX.xml
  • CREATE_INDEX: Put true if you want to create an index file for the AutoImport (only on form mode or mass upload)
  • STRUCTURE_FILE: The path of the index configuration file for the AutoImport (only on form mode or mass upload)
 ex: C:\\xampp\\htdocs\\MCC_server\\config\\structure_XXX.xml

The rest is database configuration. You must set up server and credentials to access the database of the application in which you intend to record documents with MCC (Maarch LetterBox or Maarch Framework-based applications, like Maarch Entreprise).

Set up form_XXX.xml

First you have to change the location of the DTD and set the general structure of the form with:

    <TITLE>Maarch Capture Connector</TITLE>

You can edit/create fields with:

  • list of fixed values:
        <VALUE><ID>NEW</ID><LABEL>Nouveau document</LABEL></VALUE>
        <VALUE><ID>VAL</ID><LABEL>A valider</LABEL></VALUE>
        <VALUE><ID>TRT</ID><LABEL>A traiter</LABEL></VALUE>
  • list of values in a Maarch application database:
        <WHERE_CLAUSE>status = 'NEW'</WHERE_CLAUSE>
       <ORDER>order by folder_name</ORDER>

Set up structure_XXX.xml

You can prepare the stream for mass import AutoImport using the file structure_XXX.xml


Set Up Maarch AutoImport

This is only needed if you use mass upload. You do not need to chain Maarch AutoImport with MCC Server otherwise.
This is just an outline. Please refer to the Maarch AutoImport documentation for more information.

You will find the configuration of Maarch AutoImport in the file ./maarch_autoimport/config_*.xml (the exact name of the file depends on your setup) in the main folder of AutoImport. The only important point is to make sure that the path given in the tag <SCAN_IMPORT_DIRECTORY> of AutoImport is the same as the <TARGET_PATH> of MCC Server.

Make sure you entered the correct parameters for database access.