THotPDF.NewLoadedAnnotation Method

Creates a new annotation dictionary of the specified subtype on the specified page of the loaded PDF document, suitable for appending various annotations such as highlights, links, and text annotations to an existing PDF

Declaration

function NewLoadedAnnotation(PageIndex: Integer; const ASubtype: AnsiString; ARect: THPDFRect): THPDFDictionaryObject;

Unit

HPDFDoc

Parameters

NamePurpose
PageIndexZero-based index of the target page, specifying the page where the annotation is located
X1Left coordinate of the annotation rectangle, in PDF user space
Y1Lower coordinate of the annotation rectangle, in PDF user space
X2Right coordinate of the annotation rectangle, in PDF user space
Y2Upper coordinate of the annotation rectangle, in PDF user space
ASubtypeAnnotation subtype name, e.g. Text, Link or Highlight, matching the Subtype key of the PDF specification

Return value

Returns a dictionary object representing the newly created annotation

Usage notes

Related APIs