跳转到主要内容
此对象对应一个页面。
在 Linux 和 Windows 中,它既可以是文档中的页面,也可以是由 Batch Processor 生成的页面。
它提供了一组用于页面预处理、分析、识别、页面合成和导出的方法。此对象的方法不会执行文档合成 (Synthesize 方法除外) 。在导出结果之前,你必须显式调用某个执行文档合成的方法。有关详细信息,请参阅预处理、分析、识别和合成的调优参数 FRPage 对象属于所谓的“可连接对象”。对于 Windows 上 FRE 中的 Visual Basic,可使用 WithEvents 对其进行声明。对于 C++ (在所有受支持的操作系统上) ,这意味着它支持 IConnectionPointContainer 接口。为了在处理期间接收通知事件,C++ 用户应创建一个派生自 IFRPageEvents 接口的对象,然后…
  • 在 Linux 和 macOS 中,通过调用 AdviseFREngineObject 全局函数将其连接到 FRPage 对象。
  • 在 Windows 中:通过标准 COM 方式,在该对象与 FRPage 对象中实现的事件源之间建立连接。
在 Windows 中:FRPage 对象的方法通过特殊的传出接口报告页面处理进度信息。这些接口包括 IFRPageEvents (适用于 C++) 和 dispinterface DIFRPageEvents (适用于 Visual Basic) 。需要注意的是,Visual Basic 用户无需关心实现事件接口的细节,因为该开发平台提供了便捷的处理机制。

属性

,只读

返回 Engine 对象。

,只读

返回包含该页面的文档。

,只读

提供对页面图像的访问。

提供对页面版面的访问。

将 Layout 对象赋值给此属性时 (例如,将数据从一个页面传输到另一个页面) ,相应文档的逻辑结构将变为无效状态。此时需要调用某个合成方法来恢复文档结构。但无需对整个文档执行合成,只需对已更改的页面执行合成即可,例如使用Synthesize方法。

,只读

以特殊的”纯文本”格式返回页面的文本内容。

, read-only

指定页面源图像的完整路径。

, read-only

指定已识别页面的主要语言。该属性包含已检测语言集合 (DetectedLanguages 属性) 中第一种语言的内部名称。

仅当识别时启用了自动语言检测功能,此属性才具有有效值 (详情请参阅属性) 。

默认值为空字符串。

,只读

提供对已识别页面上所检测到的识别语言集合的访问。集合中的语言按出现频率从高到低排序。

仅当识别时启用了自动语言检测功能,此属性才具有有效值 (详情请参阅属性) 。

语言列表仅在识别完成后更新,即手动编辑页面版面不会影响该集合。

, 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.

, read-only

Returns the index of the page in the source file.

, read-only

Indicates whether the source file of this page was a digitally signed PDF.

,read-only

Provides access to the collection of business cards detected on the page.

Visual Components are currently only supported for Windows.

指定是否允许使用 UndoRedo 方法。若此属性的值为 TRUE,则通过可修改页面的方法 (例如 FRPage对象的方法) 调用的命令,以及从 Windows Visual Components 调用的命令,均可被添加到撤销堆栈中。

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.

, 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 theobject) or from one of the Visual Components.

, 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 theobject) or from one of the Visual Components.

方法

名称说明
AddWordsToCacheDictionary此方法将一组词添加到缓存字典中。
AddWordToCacheDictionary此方法会向缓存字典中添加一个词。
Analyze分析页面。
AnalyzeRegion分析指定区域内图像的版面。
AnalyzeTable将指定块替换为表格块,并分析表格的结构。
CleanCacheDictionary此方法会删除缓存字典中的所有词条。
DetectOrientation检测页面方向。
DetectResolution从指定范围内选择最佳分辨率。
Export将页面以外部格式保存为文件。
ExtractBarcodes查找并识别所有条码块。
ExtractMrz从机读区 (MRZ) 中提取数据。
FindPageSplitPosition查找图像可拆分的位置。
Flush如果没有对它们的引用,则卸载与 FRPage object 对应的 ImageDocumentLayout object,并在必要时将其保存到磁盘。保存到磁盘是可选的;如果数据未发生更改,则可以省略此步骤。
IsEmpty检查页面是否为空。
LearnCheckmarks训练 FineReader Engine 识别自定义类型的复选标记。
PreprocessAnalyzeRecognize对页面执行预处理、版面分析、识别和页面合成。
Preprocess对页面进行预处理:校正页面方向、反相和几何畸变。页面预处理在页面分析之前进行。
Recognize识别页面并进行页面合成。
RecognizeBlocks在明确指定的一组 Block 中识别文本并进行页面合成。
Redo<Warning> Visual Components 目前仅支持 Windows。</Warning> 重新执行最近一次由 FineReader Engine API 调用且随后被撤销的命令。
Synthesize对单个页面执行文档合成。在 Linux 和 Windows 上,当使用 Batch Processor 处理单页文档时,此方法可能非常有用。
SynthesizeBusinessCard尝试在指定的已识别区域中查找名片字段。
SynthesizeBusinessCardEx尝试使用合成参数,在指定的已识别区域内查找名片字段。
撤销<Warning>Visual Components 目前仅支持 Windows。</Warning> 撤销最近一次通过 FineReader Engine API 调用的命令。
Update<Warning> Visual Components 目前仅支持 Windows。 </Warning> 在 Linux 和 macOS 中:将页面版面的更改保存到撤销堆栈。在 Windows 中:将通过 FineReader Engine API 对页面版面所做的更改传输到 Visual Components,并将这些更改保存到撤销堆栈。 <Note> 调用此方法时,相应文档的逻辑结构将变为无效。必须通过调用某个合成方法来恢复文档结构。但无需对整个文档执行合成操作,只需对已更改的页面进行合成即可,例如使用 Synthesize 方法。 </Note>
FRPage 对象图

输出参数

此对象是以下方法的输出参数:

输入参数

该对象会作为输入参数传递给以下方法: FRPage_VC

示例

FREngine.IEngine engine;
string fileName;
FREngine.IBatchProcessor batchProcessor;
// 假定 Batch Processor 已创建并启动
// 获取已识别的页面,并将其导出为 PDF 格式
FREngine.IFRPage page = batchProcessor.GetNextProcessedPage();
while( page != null ) {
 // 导出前先合成页面
 page.Synthesize(null);
 // 将页面导出到文件
 page.Export(fileName, FREngine.FileExportFormatEnum.FEF_PDF, null);
 page = batchProcessor.GetNextProcessedPage();
}
该对象在以下代码示例中使用:

另请参见

FRPages 使用可连接对象 使用属性