PDFium Delphi Component Docs

PageWordBoxes method

Component: TPdfView  ·  Unit: PDFium
Trả về các record TPdfWordBox cho các từ trên trang hiện tại của TPdfView kèm phạm vi ký tự và hình chữ nhật theo page-space

Syntax

function PageWordBoxes: TPdfWordBoxes;

Return Value

TPdfWordBoxes

Description

Hộp từ tách văn bản của trang theo khoảng trắng, tab, dấu ngắt dòng và ký tự NBSP

Các phương thức của thành phần còn hợp nhất các hình chữ nhật FPDFText_GetCharBox thành một TPdfRectangle trong không gian trang cho mỗi từ

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