Skip to main content
This object corresponds to a page.
In Linux and Windows, this 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.” For Visual Basic in FRE for Windows, it may be declared WithEvents. For C++ (all supported operating systems), this means that it supports the IConnectionPointContainer interface. To receive notification events during processing, C++ users should create an object derived from the IFRPageEvents interface and…
  • In Linux and macOS, advise it to the FRPage object by the call to the AdviseFREngineObject global function.
  • In Windows: set up the connection between it and the events source implemented in the FRPage object by standard COM means.
In Windows: 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.

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

Visual Components are currently only supported for Windows.

Specifies whether the Undo and Redo methods are allowed. If the value of this property is TRUE, all the commands called either with the help of the methods that can modify the page (such as methods of the FRPage or the ImageDocument object) or from the Windows Visual Components can be added to an undo stack.

In this case, the commands that 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.

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

CanRedo

VARIANT_BOOL, read-only

Visual Components are currently only supported for Windows.

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

CanUndo

VARIANT_BOOL, read-only

Visual Components are currently only supported for Windows.

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

Methods

NameDescription
AddWordsToCacheDictionaryThis method adds a group of words to the cache dictionary.
AddWordToCacheDictionaryThis method adds one word to the cache dictionary.
AnalyzeAnalyzes the page.
AnalyzeRegionAnalyzes layout of the image inside the specified region.
AnalyzeTableReplaces a specified block with a table block and analyzes the structure of the table.
CleanCacheDictionaryThis method deletes all words from the cache dictionary.
DetectOrientationDetects page orientation.
DetectResolutionSelects the best resolution from the specified range.
ExportSaves a page into a file in an external format.
ExtractBarcodesFinds and recognizes all barcode blocks.
ExtractMrzExtracts data from a machine-readable zone (MRZ).
FindPageSplitPositionFinds the position where the image can be split.
FlushUnloads 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.
IsEmptyChecks if the page is empty.
LearnCheckmarksTrains FineReader Engine to recognize checkmarks of a custom type.
PreprocessAnalyzeRecognizePerforms preprocessing, layout analysis, recognition, and page synthesis of the page.
PreprocessPreprocesses the page: corrects page orientation, inversion, geometrical distortions. Page preprocessing is performed before page analysis.
RecognizeRecognizes the page and performs page synthesis.
RecognizeBlocksRecognizes text and performs page synthesis in an explicitly specified set of blocks.
Redo<Warning> Visual Components are currently only supported for Windows. </Warning> Redoes the latest undone command which was called from the FineReader Engine API.
SynthesizePerforms document synthesis for the individual page. In Linux and Windows, this method may be useful when processing one-page documents with Batch Processor.
SynthesizeBusinessCardTries to find business card fields in the specified recognized region.
SynthesizeBusinessCardExTries to find business card fields in the specified recognized region using the synthesis parameters.
Undo<Warning> Visual Components are currently only supported for Windows. </Warning> Undoes the latest command which was called from the FineReader Engine API.
Update<Warning> Visual Components are currently only supported for Windows. </Warning> In Linux and macOS: Saves the changes in the page layout in the undo stack. In Windows: 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. </Note>
FRPage 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: FRPage_VC

Samples

FREngine.IEngine engine;
string fileName;
FREngine.IBatchProcessor batchProcessor;
// We presume that Batch Processor is created and started
// Obtain recognized pages and export them to PDF format
FREngine.IFRPage page = batchProcessor.GetNextProcessedPage();
while( page != null ) {
 // Synthesize page before export
 page.Synthesize(null);
 // Export page to a file
 page.Export(fileName, FREngine.FileExportFormatEnum.FEF_PDF, null);
 page = batchProcessor.GetNextProcessedPage();
}
The object is used in the following code samples:

See also

FRPages Working with Connectable Objects Working with Properties