Table of Contents
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:
Limits types of added files as well as their size.
Allows to downscale, crop and limit size of photos. Filter also make basic format conversion (e.g. BMP->TIFF).
Split multi-page TIFF files into several one page files.
Various filters for conversion from proprietary formats to HTML, PDF, etc...
Input Plug-ins are applied on several events:
new file is added to the document
file is added/received to the Document Assembly Tree
file in the Document Assembly Tree is opened for first time
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 Name | Context | Usage |
---|---|---|
DocTree.AddFile.InputPlugins | DocTree | Filters used when new file is added to the tree. |
Damis.InputPlugins | Damis | Filters used when file is opened for first time. |
Damis.OnReceived.InputPlugins | DamisOnReceived | Filters 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
.
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).
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
Configuration | Description |
---|---|
InputPlugin.Filter.Default.Include.1 | List 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.2 | List 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.1 | List of forbidden types. If mime-type is in the list file is forbidden. |
InputPlugin.Filter.Default.Exclude.2 | List of not recommended mime-types. If mime-type is in the list user have to confirm that file is correct. |
InputPlugin.Filter.Default.MaxSize.1 | Maximum 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.2 | Maximum recommended size in bytes. User have to explicitly confirm bigger files than the limit. |
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
Configuration | Description |
---|---|
InputPlugin.PhotoFilter.Default.FileSize | Minimal file size to activate this filter. |
InputPlugin.PhotoFilter.Default.Optimal.X | Optimal image size in X-coordinate. 640 pixels is default size. |
InputPlugin.PhotoFilter.Default.Optimal.Y | Optimal image size in Y-coordinate. 480 pixels is default size. |
InputPlugin.PhotoFilter.Default.Size.Warn | Maximal acceptable file size. File can pass through the filter but warning is displayed. |
InputPlugin.PhotoFilter.Default.Size.Ok | Maximal recommended size. |
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
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
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