Article ID: 1266 |
Category: Project Setup |
Type: FAQ |
Last Modified: 7/5/2013
Using Custom Export in FlexiCapture projects
In which cases a Custom Export is required? How to setup a Custom Export for documents?
Custom Export is required when an export task cannot be resolved with the standard means.
We can export directly into files, SharePoint, and databases which support ODBC. If you need direct export into a system which does not support ODBC, for example Document Management Systems or electronic archive systems, then custom export will be required.
Also custom export is required in the case of non-standard export scenarios, dictated by the customer‘s business processes or document structure.
In order to use custom export, choose “Custom export (Script)” type in the Export Settings dialog box.
Then choose the script language and write the script code which will carry out the export process.
In the CustomExport.rar archive you will find 3 projects:
- ExternalExport. This example shows export of document images into PDF files, export of information about the document into separate TXT file and also export of document fields into TXT file and XML file with specific format.
Direct export into a target system could be rather difficult. In many cases the easiest approach is to use XML, specifically designed for exchanging data between systems. Usually systems use a certain XML variation which they understand and from which they can load data. The problem is that XML varies from system to system. This is also true for FlexiCapture. That is why we have designed an export module which can export any documents into specified XML. You can adjust the format of the output file by making some changes to the module.
In this example, we have chosen the following format:
- <document id="1">
- ExportMrge. This example shows non-standard export into XLS. The export is non-standard due to the complex structure of the documents. There is a repeating group of fields which can “flow” from page to page and may be split either on the same page or over several pages.
We should know for sure where the group starts and where it ends.
We have implemented export into XLS using several sheets, splitting the common document data from the repeating groups. We have also implemented an export variant to export data to one sheet, where the data visually reproduces the document.
- ExportMultiTif. In this example, we consider a case where images should be exported into a multipage file (not all of the document images, only some of them). In this case, the first section is exported into one multipage file and the second section is exported into another.
In sample projects external assemblies were used. For more information about adding assemblies to the project see this article.