PDFium Component Docs

Propiedad Character

Componente: TPdf  ·  Unidad: PDFium
Acceso indexado de solo lectura a la forma de cadena UTF-16 del carácter en el índice indicado (por lo general una unidad de código, pero dos en un par sustituto)

Syntax

property Character[CharIndex: Integer]: WString; // read only

Description

Indexed read-only access to the UTF-16 string form of the character at the given index (typically one code unit, but two for a surrogate pair). The valid range is 0 .. CharacterCount - 1 for the current page; passing an out-of-range index raises EPdfError.

Characters are returned in their logical reading order — the order in which PDFium parsed the content stream — not necessarily in visual order (right-to-left scripts may appear reversed).

All coordinates are in PDF user-space points with the origin at the bottom-left. Use PdfView1.PointsToScreen or your own coordinate transform when overlaying on a VCL canvas.

Parameters

CharIndexZero-based character index in the current page (0 .. CharacterCount - 1).

Remarks

Example

var
  I: Integer;
begin
  for I := 0 to Pdf1.CharacterCount - 1 do
    Memo1.Text := Memo1.Text + Pdf1.Character[I];
end;

See Also

CharacterCount, Charcode, CharacterRectangle, TextPage