PreprocessPages Method of the FRDocument Object

This method performs preprocessing of the specified pages in the document: corrects page orientation, inversion, geometrical distortions, performs page splitting if necessary. Preprocessing is performed before layout analysis.

Syntax

C++

HRESULT PreprocessPages(
  IIntsCollection*          PageIndices,
  IPagePreprocessingParams* PreprocessingParams,
  IObjectsExtractionParams* ExtractionParams,
  IRecognizerParams*        RecognizerParams,
  IPageSplittingParams*     SplittingParams
);
    

C#

void PreprocessPages(
  IIntsCollection          PageIndices,
  IPagePreprocessingParams PreprocessingParams,
  IObjectsExtractionParams ExtractionParams,
  IRecognizerParams        RecognizerParams,
  IPageSplittingParams     SplittingParams
);
    

Visual Basic .NET

Sub PreprocessPages( _
  PageIndices As IIntsCollection, _
  [PreprocessingParams As IPagePreprocessingParams = Nothing], _
  [ExtractionParams As IObjectsExtractionParams = Nothing], _
  [RecognizerParams As IRecognizerParams = Nothing], _
  [SplittingParams As IPageSplittingParams = Nothing] _
)
    

Parameters

PageIndices
[in] Refers to the IntsCollection object that contains the numbers of pages to be preprocessed.
PreprocessingParams
[in] Refers to the PagePreprocessingParams object that stores parameters of preprocessing. This parameter may be 0. In this case, the pages are preprocessed with default parameters, or, if a profile has been loaded, the parameters set by this profile are used.
ExtractionParams
[in] Refers to the ObjectsExtractionParams object that stores parameters of objects extraction. This parameter may be 0. In this case, the objects are extracted with default parameters, or, if a profile has been loaded, the parameters set by this profile are used.
RecognizerParams
[in] Refers to the RecognizerParams object that stores recognition parameters necessary for preprocessing (e.g., recognition language). This parameter may be 0. In this case, the default parameters are used, or, if a profile has been loaded, the parameters set by this profile are used.
SplittingParams
[in] Refers to the PageSplittingParams object that stores parameters of page splitting. This parameter may be 0. In this case, no split is done for the pages of the document, or, if a profile has been loaded, the parameters set by this profile are used.

Return values

If document processing is interrupted by the user, this method will return E_ABORT. It also returns the standard return codes of ABBYY FineReader Engine functions.

Remarks

  • This method may report events to the listeners attached to the IConnectionPointContainer interface of the FRDocument object.
  • Depending on the value of the IEngine::MultiProcessingParams property, ABBYY FineReader Engine can distribute preprocessing of multi-page documents to CPU cores.

See also

FRDocument

Working with Profiles

24.03.2023 8:51:52

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.