property Rectangle[Index: Integer]: TPdfRectangle; // read only
Rectangle[Index] returns one bounding rectangle generated by RectangleCount for text on the current page.
Call RectangleCount(StartIndex, Count) first to determine how many rectangles PDFium exposes for the requested text range, then read Rectangle[0] through Rectangle[Count - 1].
The returned TPdfRectangle uses PDF page coordinates. Use PageToDevice when you need viewer or bitmap coordinates.
Index jest numerowany od zera i musi być mniejszy od bieżącej liczby prostokątów
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;