跳到主要内容

AddReply

在此批注上添加回复。

语法

expression.AddReply(textAnnot);

expression - 表示 ApiBaseAnnotation 类的变量。

参数

名称必需/可选数据类型默认值描述
textAnnot必需ApiTextAnnotation未提供描述。

返回值

boolean

示例

在 PDF 文档中创建方形注释并向其添加回复。

// How to add the reply for an annotation in a PDF document?

// Add the reply and display the result in a PDF document.

let doc = Api.GetDocument();
let squareAnnot = Api.CreateSquareAnnot([10, 10, 160, 32]);
squareAnnot.SetContents("Annot contents");
let page = doc.GetPage(0);
page.AddObject(squareAnnot);

let textAnnot = Api.CreateTextAnnot([10, 10, 20, 20]);
textAnnot.SetContents("Annot reply");
squareAnnot.AddReply(textAnnot);