6.5

© 2007 ABBYY. All rights reserved.
60
Export procedure
In order to implement a custom export procedure, you must create an ActiveX component and implement in it a method with the
following signature:
Function ExportBatch( _
ByVal ExportData As String, _
Optional ByRef ResultReport As String _
) As Long
The first argument, ExportData, contains the export settings and batch data in the XML format. The specification for these data is
given below in the ExportData argument section.
The second argument, ResultReport, can return a message about the results of batch export.
If a batch was exported successfully the message can contain the name of the final output file. This message will be listed in the event
log together with the message about successful export.
If the batches cannot be exported, the ResultReport argument must return an error message. It will also be listed in the event log.
The ExportBatch method must return export results and have one of the following values:
Value Description
0 The batch has been exported successfully. The batch is routed to the processed batches queue.
–1
Batch export has been canceled/interrupted by the user. This batch is not routed to the problem batches queue and can be
exported again. The other batches can be exported.
–2
Batch export error. The other batches can be exported. The problem batch is routed to the problem batches queue. In order to
export this batch, it should be returned to the Export queue (this can be done on the Export and Monitoring Station).
–3
The export procedure has been canceled/interrupted by the user. No error message is displayed. The current batch is not
routed to the problem batches queue and can be exported again.
–4
Export procedure fatal error (for example, an error in the settings or database connection error). The export procedure is
interrupted. An error message is displayed. The current batch is routed to the problem batches queue. In order to export this
batch, it should be returned to the Export queue (this can be done on the Export and Monitoring Station).
ExportData argument
Data are transferred as a string in XML format. You must parse the string by using the MSXML.dll library (the
MSXML.DOMDocument.loadXML method), read the data iterating them by elements and attributes, and export the data as required.
General data hierarchy
The hierarchy of the elements is as follows:
root
exportSettings
exportSetting
...
exportSetting
batch
registrationParameters
registrationParameter
...
registrationParameter
document
page
block
...
block
...
page
document
...
document
page
...
document
For the description of each element, its attributes and nested elements, refer to the next pages.
"root" element
The "root" element is a root element.
It has the following attributes:
Attribute
name
Type Required Description
version string Yes Format version. The current version is 1.0.