DAExtractPageTextBlocks
文字、擷取、直接存取功能
描述
類似 DAExtractPageText 函式,但結果存進文字區塊清單,而不是以 CSV 字串傳回
結果進入文字區塊清單後,可用 DAGetTextBlockCount、DAGetTextBlockText 與 DAGetTextBlockColor 等函式取出每個文字區塊的屬性
語法
Delphi
Function TPDFlib.DAExtractPageTextBlocks(FileHandle, PageRef, ExtractOptions: Integer): Integer;
ActiveX
Function PDFlib::DAExtractPageTextBlocks(FileHandle As Long, PageRef As Long, ExtractOptions As Long) As Long
DLL
int DLDAExtractPageTextBlocks(int InstanceID, int FileHandle, int PageRef, int ExtractOptions);
參數
| FileHandle | 由 DAOpenFile、DAOpenFileReadOnly 或 DAOpenFromStream 函式傳回的控制代碼 |
|---|---|
| PageRef | 由 DAFindPage 或 DANewPage 函式傳回的頁面參照 |
| ExtractOptions | 3 = 一般擷取,4 = 分割單字 |
傳回值
| 0 | 無法從頁面擷取文字 |
|---|---|
| Non-zero | A TextBlockListID value |