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
ASubtype注释子类型名称,如 TextLinkHighlight,对应 PDF 规范中的 Subtype 键值
ARectThe position and size rectangle of the annotation on the page, using the PDF coordinate system (origin at the bottom-left corner of the page)

Return value

返回代表新建注释的 THPDFDictionaryObject,可进一步写入颜色、内容文本、动作等附加属性

Usage notes

Related APIs