property Annotation[Index: Integer]: TPdfAnnotation; // read/write
Indexed read/write property that returns or updates the annotation record at the given index on the current page
Requires Active to be True; the result is undefined when the index is outside the valid range, so pass values in 0 .. AnnotationCount - 1
The returned record is a snapshot of the value as it stood at the moment of the call; later edits to the document leave previously returned records untouched
AttachmentPointSets contains every quadrilateral used by multi-line highlight, underline, squiggly, and strikeout annotations; AttachmentPoints remains a compatibility alias for the first set
For anLink annotations carrying a /URI action, HasLinkUri is populated as True and LinkUri holds the decoded URI target string; link annotations without a /URI action leave HasLinkUri as False so round-trip updates preserve non-URI link actions
Assigning the record writes changed values back to the annotation; set a Has* sentinel when an existing string must be explicitly cleared to an empty value
| Index | Zero-based index in the range 0 .. AnnotationCount - 1 |
/Annots array
var
I: Integer;
begin
if not Pdf1.Active then Exit;
for I := 0 to Pdf1.AnnotationCount - 1 do
begin
// inspect Pdf1.Annotation[I]
Memo1.Lines.Add(IntToStr(I));
end;
end;