跳轉到主要內容
此物件可透過 ABBYY FineReader Engine 的匯出函式,調整將已辨識文字匯出為 HTML 格式時所使用的Parameter。此物件的指標會作為輸入Parameter傳遞至匯出方法,因此會影響匯出結果。新建立的此類型物件,其所有屬性都會設為合理的預設值。如需進一步瞭解各屬性的預設值,請參閱對應屬性的說明。 HTMLExportParams 物件是持久性物件。這表示物件的目前狀態可寫入持久性儲存體。之後,可透過從持久性儲存體讀取物件狀態來重新建立該物件。以下方法可用來持久化物件: Linux:SaveToFileLoadFromFile Windows:SaveToFileLoadFromFileSaveToMemoryLoadFromMemory

屬性

,唯讀的

傳回 Engine 物件。

指定匯出時使用的 HTML 版本。

若將此屬性的值設為 HFM_Format40 或 HFM_Format50,則 HTMLSynthesisMode 和 SeparatePages 屬性 分別不能設為 HSM_PlainText 和 TRUE。

預設值為 HFM_Format40。

指定從已辨識文字合成 HTML 程式碼的模式。 共有四種合成模式:僅保留段落、保留段落和字型、保留文件的完整結構、 保留文件的精確副本。

若將此屬性的值設為 HSM_PlainText,則 HTMLFormatMode 屬性的值不能設為 HFM_Format40 或 HFM_Format50,且 UseCss 屬性的值必須設為 FALSE。

預設值為 HSM_FlexibleLayout,表示保留文件的完整結構。

指定是否使用文件的邏輯結構來重建輸出文件的結構。若此屬性 為 FALSE,則輸出文件的結構將依據版面配置區塊重建。

若 SeparatePages 屬性的值為 TRUE,則此屬性不能設為 TRUE。

此屬性預設為 TRUE。

若此屬性為 TRUE 且多個頁面匯出為 HTML 格式,則會在頁面之間插入 <HR> 標籤,使瀏覽器 顯示水平分隔線。

若此屬性為 TRUE:
  • 文件的邏輯結構將不會保留 (UseDocumentStructure 屬性不能設為 TRUE) 。
  • HTMLFormatMode 屬性的值不能 設為 HFM_Format40 或 HFM_Format50。
  • UseCss 屬性的值必須設為 FALSE。

預設值為 FALSE。

決定是否建立樣式表。樣式表可寫入獨立的 .css 檔案,或寫入 HTML 文件的標頭中。

若 SeparatePages 屬性的值為 TRUE,則此屬性不能設為 TRUE。

此屬性的預設值為 TRUE。

指定將輸出文件分割為多個檔案的模式。

此屬性預設為 HDSM_None。

指定匯出時是否保留已辨識文字中的原始行。

此屬性預設為 FALSE。

Specifies if original colors of text and background are retained during export of the recognized text in HTML format.

This property is TRUE by default.

Specifies whether the running titles should be saved to an output HTML file.

This property is TRUE by default.

,read-only

Specifies if the author, subject, title, and keywords of the document should be written into the output file. These parameters of the document are defined in thesubobject of theobject.

指定 HTML 格式輸出檔案的編碼類型。

若要將此屬性的值變更為 TET_Simple,請先設定正確的字碼頁 (CodePage 屬性) 。

此屬性的預設值為 TET_Auto,表示編碼將依據用於指定匯出格式的常數來決定:

This property specifies the code page to which the recognized text is exported. The value of this property is taken into account only when the EncodingType property has the value TET_Simple (exported text is not Unicode), and in this case, the property must specify a valid code page (it cannot be CP_Null).

First, set the correct code page and only then change the value of the EncodingType property to TET_Simple.

By default, this property is CP_Null.

Specifies whether pictures must be saved along with the file in HTML format. If pictures are not written, references to them in HTML files are also omitted.

The default value is TRUE.

,read-only

Specifies the image format and JPEG quality which should be used for embedded pictures in the output file.

方法

名稱說明
CopyFrom以另一個物件中對應屬性的值初始化目前物件的屬性。
LoadFromFile從磁碟上的檔案還原物件內容。
LoadFromMemory <Note> : 僅限 Windows。 </Note>從全域記憶體還原物件內容。
SaveToFile將物件內容儲存到磁碟上的檔案。
SaveToMemory <Note> : 僅限 Windows。 </Note>將物件內容儲存到全域記憶體。
HTMLExportParams 物件圖

輸出 Parameter

此物件是 Engine 物件的 CreateHTMLExportParams 方法的輸出 Parameter。

輸入Parameter

此物件會作為輸入Parameter傳遞至下列方法:

範例

此物件用於下列程式碼範例:CommandLineInterface (Windows 和 Linux) 。

另請參閱

調整匯出參數 使用設定檔 使用屬性