How to limit number of pages for processing

Question

How to limit the number of pages to process?

Answer

The main idea for such a scenario is to use the Recognize method of the FRPage object for each page you need.

CheckResult( frDocument->Preprocess( 0 ) );
CheckResult(frDocument->Analyze());
for (int i = 0; i < 10; i++) {
CheckResult(frDocument->get_Pages(&frPages));
CheckResult(frPages->get_Element(i, &frPage));
CheckResult(frPage->Recognize());
}
CheckResult(frDocument->Synthesize());

The code above will recognize only the first ten pages in the document.

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.