ExtractFilePageTextBlocksA
文字、擷取、頁面屬性
描述
結尾的 A 表示 ANSI(char)DLL 進入點;ActiveX/COM 介面只提供 Unicode 形式。行為與 ExtractFilePageTextBlocks 完全相同,字串參數依目前 SetAnsiMode 的字碼頁解讀
類似 ExtractFilePageText 函式,但結果存進文字區塊清單,而不是以 CSV 字串傳回
此函式內部使用直接存取功能。
結果進入文字區塊清單後,可用 DAGetTextBlockCount、DAGetTextBlockText 與 DAGetTextBlockColor 等函式取出每個文字區塊的屬性
語法
Delphi
Function DLExtractFilePageTextBlocksA(InstanceID: Integer; InputFileName, Password: PAnsiChar; Page, Options: Integer): Integer;
DLL
int DLExtractFilePageTextBlocksA(int InstanceID, const char* InputFileName, const char* Password, int Page, int Options);
參數
| InputFileName | 要擷取文字的檔案路徑與檔名。 |
|---|---|
| Password | 開檔時使用的密碼(若有的話) |
| Page | 要擷取的頁碼。文件的第一頁是第 1 頁。 |
| Options | 3 = 一般擷取,4 = 分割單字 |
傳回值
| 0 | 無法擷取文字 |
|---|---|
| 1 | TextBlockListID 值 |