Question
How can I export unrecognized documents as images, one for each page?
Answer
To do this, you need to enable ShouldExportUnknownDocuments and set FileAssemblingRule for ExportParamsForUnknownDocuments properties of the BatchTypeParams object. For example:
// C#
var batchTypeParams = project.CreateBatchTypeParams();
batchTypeParams.ShouldExportUnknownDocuments = true;
batchTypeParams.ExportParamsForUnknownDocuments.FileAssemblingRule = ImageFileAssemblingRuleEnum.IFAR_FilePerImage;
batchTypeParams.ExportParamsForUnknownDocuments.OverwriteFiles = true;
batchTypeParams.ExportParamsForUnknownDocuments.Path = exportPath;
// Setting the Format, Color and Copmression type of the exported files
batchTypeParams.ExportParamsForUnknownDocuments.Format = ImageFileFormatEnum.IFF_Png;
batchTypeParams.ExportParamsForUnknownDocuments.ColorType = ImageColorTypeEnum.ICT_Color;
batchTypeParams.ExportParamsForUnknownDocuments.CompressionType = ImageCompressionTypeEnum.ICT_Png;
var batchType = project.BatchTypes.AddNew("NewBatchType", batchTypeParams);
var batch = project.Batches.AddNewEx(batchType);
batch.Open();
batch.AddImage(filePath);
batch.Recognize(null, RecognitionModeEnum.RM_ReApplyDocumentDefinitions, null);
project.Export(null, null);
You can find additional information about the ImageExportParams, combinations of the Format, ColorType, and CompressionType properties in the FlexiCapture SDK User's Guide.
Comments
0 comments
Please sign in to leave a comment.