PDFium Delphi Component Docs

Rectangle Proprietà

Componente: TPdf  ·  Unità: PDFium
Restituisce un rettangolo di delimitazione del testo dal layout del testo della pagina corrente

Syntax

property Rectangle[Index: Integer]: TPdfRectangle; // read only

Description

Rectangle[Index] restituisce un rettangolo di bounding generato da RectangleCount per il testo nella pagina corrente

Chiama prima RectangleCount(StartIndex, Count) per scoprire quanti rettangoli PDFium espone per l'intervallo di testo richiesto, poi leggi Rectangle[0] fino a Rectangle[Count - 1]

Il TPdfRectangle restituito usa coordinate pagina PDF. Usa PageToDevice quando ti servono coordinate della vista o del bitmap

Remarks

Example

var
  I, Count: Integer;
  R: TPdfRectangle;
begin
  Count := Pdf1.RectangleCount(0, Pdf1.CharacterCount);
  for I := 0 to Count - 1 do
  begin
    R := Pdf1.Rectangle[I];
    Memo1.Lines.Add(Format('%.2f, %.2f, %.2f, %.2f', [R.Left, R.Top, R.Right, R.Bottom]));
  end;
end;

See Also

RectangleCount, Text, TextInRectangle, PageToDevice