How to use mergepattern in Fine Reader Engine 12?

Question

How to deal with mergepattern in Fine Reader Engine 12?

Answer

The syntax described in the Developer's help: API Reference > Engine Object (IEngine Interface) > Supplementary Methods.

This method merges several user pattern files into one file.

The syntax for C++:

HRESULT MergePatterns(
  IStringsCollection* SourceFilesNames,
  BSTR                DestinationFileName
);

The syntax for C#:

void MergePatterns(
  IStringsCollection SourceFilesNames,
  string            DestinationFileName
);

 Here is the code example:

IStringsCollection col = engineLoader.Engine.CreateStringsCollection();
col.Add("C:\\Users\\Mojtaba\\Desktop\\Patterns\\Full\\t(1).ptn");
col.Add("C:\\Users\\Mojtaba\\Desktop\\Patterns\\Full\\t(2).ptn");
col.Add("C:\\Users\\Mojtaba\\Desktop\\Patterns\\Full\\t(3).ptn");
EngineLoader.Engine.MergePatterns(col, "C:\\Path\\Merged.ptn");

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.

Recently viewed