property CharacterFontWeight[Index: Integer]: Integer; // read only
Indexed read-only access to the OS/2 usWeightClass value of the font used (100 = Thin, 400 = Regular, 700 = Bold, 900 = Black). 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)
| Index | Zero-based character index in the current page (0 .. CharacterCount - 1) |
CharacterCount resets to 0 when Active is False or no page is openCharacterGenerated)
var
I: Integer;
begin
for I := 0 to Pdf1.CharacterCount - 1 do
if Pdf1.CharacterFontWeight[I] >= 700 then ShowMessage('bold');
end;