DAExtractPageTextBlocks

Text, Extraction, Direct access functionality

Description

Similar to the DAExtractPageText function but the results are stored in a text block list rather than returned as a CSV string.

Once the results are in the text block list, functions such as DAGetTextBlockCount, DAGetTextBlockText and DAGetTextBlockColor can be used to retrieve the properties of each block of text.

Syntax

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);

Parameters

FileHandleA handle returned by the DAOpenFile, DAOpenFileReadOnly or DAOpenFromStream functions
PageRefA page reference returned by the DAFindPage or DANewPage functions
ExtractOptions3 = Normal extraction 4 = Split words

Return values

0Text could not be extracted from the page
Non-zeroA TextBlockListID value