AddAnnotationReply
Annotations and hotspot links
Description
This page describes AddAnnotationReply in PDFlibPas under the "Annotations and hotspot links" topic. API names, parameters, class names, filenames, and literals are kept exactly as they appear in the Delphi library and DLL entry points.
Review the syntax, parameters, and return values before calling the function.
Syntax
Delphi
Function TPDFlib.AddAnnotationReply(TargetAnnot: Integer; Const Author, Contents: WideString): Integer;
Parameters
TargetAnnot is the 1-based index of the annotation being replied to on the selected page. Author is the reviewer name stored in /T; Contents is the reply text.
Return Values
Returns the 1-based index of the newly appended reply annotation, or 0 when the target annotation does not exist or is not stored as an indirect object.
Remarks
The reply is a hidden Text annotation whose /IRT entry references the target and whose /RT relationship is /R (ISO 32000-1 §12.5.6.4), so PDF viewers thread it under the target in the comment panel. Combine with AddAnnotationState for review status changes. Requires PDF 1.5; the document version is raised automatically.