GetIconType
获取此批注的图标类型。
语法
expression.GetIconType();
expression - 表示 ApiTextAnnotation 类的变量。
参数
此方法没有任何参数。
返回值
示例
获取 PDF 文档中文本注释的图标类型。
// How to get the icon type for a text annotation in a PDF document?
// Get the icon type and display the result in a PDF document.
let doc = Api.GetDocument();
let textAnnot = Api.CreateTextAnnot([10, 10, 20, 20]);
textAnnot.SetContents("Annot contents");
let page = doc.GetPage(0);
page.AddObject(textAnnot);
console.log(`Text annot icon type is: ${textAnnot.GetIconType()}`);