PDFium Delphi Component Docs

PageWordBoxes 메서드

컴포넌트: TPdfView  ·  유닛: PDFium
현재 TPdfView 페이지의 단어를 문자 범위와 페이지 좌표 사각형이 있는 TPdfWordBox 레코드로 반환합니다

Syntax

function PageWordBoxes: TPdfWordBoxes;

Return Value

TPdfWordBoxes

Description

Word boxes split page text on whitespace, tabs, line breaks, and NBSP characters

The component methods also union FPDFText_GetCharBox rectangles into one page-space TPdfRectangle for each word

Remarks

Example

var Words: TPdfWordBoxes;
  Rects: TPdfRectangles;
begin
  Words := PdfView1.PageWordBoxes;
  if Length(Words) > 0 then
  begin
    SetLength(Rects, 1);
    Rects[0] := Words[0].Rect;
    PdfView1.SetReadingHighlight(Rects, Words[0].Page);
  end;
end;

See Also

Text, SetReadingHighlight