GetPageTextW method

<< Click to Display Table of Contents >>

Navigation:  Component Description > Methods >

GetPageTextW method

Declaration

function GetPageTextW(PageNo: Integer; format: string = ''): WideString;

Description

This function retrieves the text of a certain text as an unicode string.

See GetPageText.

This function is implemented like this:

function TWPViewPDF.GetPageTextW(PageNo: Integer; format: string = '')

  : WideString;

var

  len: Integer;

begin

  len := CommandStrEx(COMPDF_GetTextLenW, format, PageNo);

  SetLength(Result, len);

  if len > 0 then

    CommandEx(COMPDF_GetTextBufW, Cardinal(PWideChar(Result)));

end;

 

Note: PageNo is 0 based.

Also note the possibility to specify a rectangle for the extraction