Chapter 9. Input Plug-ins

Table of Contents

1. Configuration
1.1. Damis.InputPlugins
1.2. Damis.OnReceived.InputPlugins
2. Basic Filter
3. Photo Filter
4. Tiff Splitter
5. AVN Filter
6. ChangeMimetype filter

Input Plug-ins are components which allows preprocessing of newly added files. These Plug-ins are applied on the locally added files. They can be also applied on files received from the Damis.

Commonly used input plug-ins:

Basic Filter

Limits types of added files as well as their size.

Photo Filter

Allows to downscale, crop and limit size of photos. Filter also make basic format conversion (e.g. BMP->TIFF).

Tiff Splitter

Split multi-page TIFF files into several one page files.

Specialized Filters

Various filters for conversion from proprietary formats to HTML, PDF, etc...

Input Plug-ins are applied on several events:

1. Configuration

Filters are configured in the Tahiti.xml. There are separate lists of filters used for each event. List contains comma separated names of filters. Filters are applied in the order as they are in the configuration.

Example 9.1. Example of Input Plug-ins Configuration

<Item name="DocTree.AddFile.InputPlugins" type="string" 
   default="@lightcomp.com/tahiti.input_plugin.tiffsplitter;1,
            @lightcomp.com/tahiti.input_plugin.convertavn;1,
            @lightcomp.com/tahiti.input_plugin.photofilter;1,
            @lightcomp.com/tahiti.input_plugin.filter;1">
 <Description value=""/>
</Item>

This configuration will 4 filters on every newly added file to the tree. Possible Input Plug-ins configurations:

Table 9.1. Configurations of Input Plug-ins

Configuration NameContextUsage
DocTree.AddFile.InputPluginsDocTreeFilters used when new file is added to the tree.
Damis.InputPluginsDamisFilters used when file is opened for first time.
Damis.OnReceived.InputPluginsDamisOnReceivedFilters used when file is received from the server.

There is common configuration for all filters as well as specialized configuration for each filter usage - called context. Each filter configuration contains word Default. Such configuration is used for all contexts. Context specific configuration has instead of name Default name of the context, e.g.: InputPlugin.Filter.DocTree.Include.1, can be used to limit used files in the context DocTree.

1.1. Damis.InputPlugins

Filters are applied when user open file for first time. There have to be attribute Damis.InputFilter with 2nd bit on (e.g.: Damis.InputFilter=2).

1.2. Damis.OnReceived.InputPlugins

Filters are applied on received documents/files from the Damis server. There have to be attribute Damis.InputFilter with lowest bit on. Filters are applied in separate thread and have to be without user interface. Tiff Splitter is usually called here.

2. Basic Filter

Basic Filter is used for limiting size of files and also types. It is possible to limit maximum file size or warn user when file is greater then recommended size.

Filter name: @lightcomp.com/tahiti.input_plugin.filter;1

Table 9.2. Basic filter configuration

ConfigurationDescription
InputPlugin.Filter.Default.Include.1List of allowed mime-types. If this list is empty all types are allowed. Files with different types then in the list are not allowed.
InputPlugin.Filter.Default.Include.2List of recommended mime-types. If this list is non empty and mime-type of the file is not in the list warning is displayed.
InputPlugin.Filter.Default.Exclude.1List of forbidden types. If mime-type is in the list file is forbidden.
InputPlugin.Filter.Default.Exclude.2List of not recommended mime-types. If mime-type is in the list user have to confirm that file is correct.
InputPlugin.Filter.Default.MaxSize.1Maximum file size in bytes. Bigger files than this limit are not allowed. When this value is 0 no limit is applied.
InputPlugin.Filter.Default.MaxSize.2Maximum recommended size in bytes. User have to explicitly confirm bigger files than the limit.

3. Photo Filter

Photo Filter is visual component used to achieve smaller files. Component also provides automatic conversion of BMP files to optimized TIFF files.

Filter name: @lightcomp.com/tahiti.input_plugin.photofilter;1

Supported operations:

  • downscale

  • crop

  • save as JPEG with lower quality

Table 9.3. Photo filter configuration

ConfigurationDescription
InputPlugin.PhotoFilter.Default.FileSizeMinimal file size to activate this filter.
InputPlugin.PhotoFilter.Default.Optimal.XOptimal image size in X-coordinate. 640 pixels is default size.
InputPlugin.PhotoFilter.Default.Optimal.YOptimal image size in Y-coordinate. 480 pixels is default size.
InputPlugin.PhotoFilter.Default.Size.WarnMaximal acceptable file size. File can pass through the filter but warning is displayed.
InputPlugin.PhotoFilter.Default.Size.OkMaximal recommended size.

4. Tiff Splitter

Tiff Splitter is used to split multi-page Tiff file into several one-page TIFF files. This component is without user interface and has no configuration.

Filter name: @lightcomp.com/tahiti.input_plugin.tiffsplitter;1

5. AVN Filter

AVN filter is used to convert output from software called AVN to HTML. Filter automatically detects file encoding and format. This filter has no user interface and no configuration.

Filter name: @lightcomp.com/tahiti.input_plugin.convertavn;1

6. ChangeMimetype filter

ChangeMimetype filter is used to change Mimetype of outlook messages ( files .msg). Filter is activated when file with mimetype application/msoutlook or application/x-msoutlook is inserted. Mimetype is changed to value obtained from configuration from variable named "Views.Mail.Outlook.MimeType"

Filter name: @lightcomp.com/tahiti/change_mimetype;1