Chinese Simplified (简体中文)

FRPage Object (IFRPage Interface)

This object corresponds to a page. It can be either a page of a document, or a page produced by Batch Processor. It provides a set of methods for page preprocessing, analysis, recognition, page synthesis, and export. The methods of this object do not perform document synthesis (except for the Synthesize method). Before exporting the results you must explicitly call some method which performs document synthesis. See Tuning Parameters of Preprocessing, Analysis, Recognition, and Synthesis for details.

The FRPage object is a so-called "connectable object." It may be declared WithEvents in Visual Basic. For a C++ user, this means that it supports the IConnectionPointContainer interface. To receive notification events during processing, a C++ user should create an object derived from the IFRPageEvents interface, then set up the connection between it and the events source implemented in the FRPage object by standard COM means.

The methods of the FRPage object report information about page processing progress through special outgoing interfaces. These interfaces are IFRPageEvents (for C++) and the dispinterface DIFRPageEvents (for Visual Basic). It should be noted that Visual Basic users should not care for details of implementing event interfaces, as this development platform provides easy means for handling them.

Properties

Name Type Description
Application Engine, read-only Returns the Engine object.
Common attributes
Document FRDocument, read-only Returns the document which contains the page.
ImageDocument ImageDocument, read-only Provides access to the image of the page.
Layout Layout

Provides access to the layout of the page.

Note: When you assign a Layout object to this property (for example, when transferring data from one page to another), the logical structure of the corresponding document becomes invalid. It is necessary to restore the document structure by calling one of the synthesis methods. However, you do not need to perform synthesis for the whole document, it is only necessary to synthesize changed pages, e.g., using the Synthesize method.

PlainText PlainText, read-only Returns the text of the page in a special "plain text" format.
SourceImagePath BSTR, read-only Specifies the full path to the source image of the page.
Page languages
BasicLanguage BSTR, read-only

Specifies the main language of the recognized page. The property contains the internal name of the first language in the collection of detected languages (DetectedLanguages property).

This property has a meaningful value only if recognition was performed with the automatic language detection on (see the IRecognizerParams::LanguageDetectionMode property for details).

By default, it is an empty string.

DetectedLanguages DetectedLanguages, read-only

Provides access to the collection of recognition languages detected on the recognized page. Languages in the collection are sorted by the frequency of occurrence: from the most frequently occurred to the least.

This property has a meaningful value only if recognition was performed with the automatic language detection on (see the IRecognizerParams::LanguageDetectionMode property for details).

The list of languages is updated only after recognition, i.e., if you edit the layout of the page manually, the collection remains the same.

Page structure
PageStructureOutOfDate VARIANT_BOOL, read-only

Specifies whether the logical structure of the page is out of date. If this property is TRUE, you should perform document synthesis for the page before export. Otherwise, an error will occur during export.

This property is useful when you work with Visual Components. The logical structure of a page becomes invalid if a user changes layout of this page via GUI of Visual Components. If export of such page is performed using commands available in Visual Components, Visual Components synthesize the page automatically. But if you use FineReader Engine API methods for export, you are responsible for performing document synthesis for the page before export.

SourceFilePageIndex int, read-only Returns the index of the page in the source file.
SourceHasDigitalSignature VARIANT_BOOL, read-only Indicates whether the source file of this page was a digitally signed PDF.
Business cards
BusinessCards BusinessCards, read-only Provides access to the collection of business cards detected on the page.
Undo support
UndoSupport VARIANT_BOOL

Specifies whether the Undo and Redo methods are allowed. If the value of this property is TRUE, all the commands called from the Visual Components or with the help of the methods that can modify the page (such as methods of the FRPage or the ImageDocument object) can be added to an undo stack. In this case, the commands which were called from the Visual Components are added to the stack automatically. To add to the stack the commands which were called from the API, use the Update method.

Note: The property cannot be set to FALSE for a page which has been opened in Visual Components.

CanRedo VARIANT_BOOL, read-only

Specifies whether the Redo method can be executed for the latest undone command which was called either from one of the Visual Components, or with the help of one of the methods that can modify the page (such as methods of the FRPage or the ImageDocument object).

CanUndo VARIANT_BOOL, read-only

Specifies whether the Undo method can be executed for the latest command which was called either from one of the Visual Components, or with the help of one of the methods that can modify the page (such as methods of the FRPage or the ImageDocument object).

Methods

Name Description
AddWordsToCacheDictionary This method adds a group of words to the cache dictionary.
AddWordToCacheDictionary This method adds one word to the cache dictionary.
Analyze Analyzes the page.
AnalyzeRegion Analyzes layout of the image inside the specified region.
AnalyzeTable Replaces a specified block with a table block and analyzes the structure of the table.
CleanCacheDictionary This method deletes all words from the cache dictionary.
CorrectGeometricalDistortions Straightens out distorted lines on an image. Distorted lines may occur close to the binding when scanning/photographing thick books.
DetectOrientation Detects page orientation.
DetectResolution Selects the best resolution from the specified range.
Export Saves a page into a file in an external format.
ExtractBarcodes Finds and recognizes all barcode blocks.
ExtractMrz Extracts data from a machine-readable zone (MRZ).
FindPageSplitPosition Finds the position where the image can be split.
Flush Unloads and, if necessary, saves to disk the ImageDocument and the Layout objects corresponding to the FRPage object if there are no references to them. Saving to disk is an option, you can omit this stage if the data has not been changed.
IsEmpty Checks if the page is empty.
LearnCheckmarks Trains FineReader Engine to recognize checkmarks of a custom type.
PreprocessAnalyzeRecognize Performs preprocessing, layout analysis, recognition, and page synthesis of the page.
Preprocess Preprocesses the page: corrects page orientation, inversion, geometrical distortions. Page preprocessing is performed before page analysis.
Recognize Recognizes the page and performs page synthesis.
RecognizeBlocks Recognizes text and performs page synthesis in an explicitly specified set of blocks.
Redo

Redoes the latest undone command which was called from the FineReader Engine API.

Synthesize Performs document synthesis for the individual page. This method may be useful when processing one-page documents with Batch Processor.
SynthesizeBusinessCard Tries to find business card fields in the specified recognized region.
SynthesizeBusinessCardEx Tries to find business card fields in the specified recognized region using the synthesis parameters.
Undo

Undoes the latest command which was called from the FineReader Engine API.

Update

Transfers changes in the page layout made via FineReader Engine API to Visual Components and saves these changes to the undo stack.

Note: When you call this method, the logical structure of the corresponding document becomes invalid. It is necessary to restore the document structure by calling one of the synthesis methods. However, you do not need to perform synthesis for the whole document, it is only necessary to synthesize changed pages, e.g., using the Synthesize method.

Related objects

Object Diagram

Output parameter

This object is the output parameter of the following methods:

Input parameter

This object is passed as an input parameter to the following methods:

Related Visual Components

Samples

C# code

The object is used in the following code samples: BatchProcessing, CustomLanguage, CommandLineInterface, RecognizedTextProcessing, VisualComponents; and demo tools: BatchProcessingRecognition, Business Card Recognition, Camera OCR, Engine Predefined Processing Profiles, Image Preprocessing.

See also

FRPages

Working with Connectable Objects

Working with Properties

17.09.2024 15:14:41

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.