FindPageSplitPosition Method of the FRPage Object
This method finds the position of splitting the image on pages, if it exists. It is used to detect the possibility of splitting dual pages in a book.
To find the position where the image can be split:
- Detect orientation of the image using the IFRPage::DetectOrientation method.
- Pass the returned TextOrientation object to the FindPageSplitPosition method.
The split position is defined by two lines, the coordinates of which are returned in the startSplitPosition and endSplitPosition parameters. The image area between these two lines should be removed when splitting image on pages. This area usually contains some garbage.
Syntax
HRESULT FindPageSplitPosition( IObjectsExtractionParams* ExtractionParams, ITextOrientation* TextOrientation, PageSplitDirectionEnum* SplitDirection, int* StartSplitPosition, int* EndSplitPosition );
Parameters
- ExtractionParams
- [in] 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.
- TextOrientation
- [in] Refers to the TextOrientation object that specifies orientation of the text on the image. If this parameter is 0, ABBYY FineReader Engine presumes that the image has normal orientation.
- SplitDirection
- [out] This variable receives the type of possible split: vertical split, horizontal split, or no split. Refer to the PageSplitDirectionEnum description for details.
- StartSplitPosition
- [out] The coordinate of the first line which defines split position (if a split is possible). The meaning of this value depends on the value of the splitDirection variable. If the possibility of vertical split is detected, it contains the horizontal coordinate of the split line. If the possibility of horizontal split is detected, it contains the vertical coordinate of the split line. Coordinate is given against the deskewed black-and-white page of the image.
- EndSplitPosition
- [out] The coordinate of the second line which defines split position (if a split is possible). The meaning of this value depends on the value of the splitDirection variable. If the possibility of vertical split is detected, it contains the horizontal coordinate of the split line. If the possibility of horizontal split is detected, it contains the vertical coordinate of the split line. Coordinate is given against the deskewed black-and-white page of the image.
Return values
This method has no specific return values. It returns the standard return values of ABBYY FineReader Engine functions.
See also
03.07.2024 8:50:10