跳到主要内容

GetType

获取图章类型。

语法

expression.GetType();

expression - 表示 ApiStampAnnotation 类的变量。

参数

此方法没有任何参数。

返回值

StampType

示例

获取 PDF 文档中图章注释的类型。

// How do I get the type in a PDF document?

// Get the type using a stamp annotation object in a PDF document.

let doc = Api.GetDocument();
let stampAnnot = Api.CreateStampAnnot([10, 10, 0, 0], 'D_Reviewed', 'Joe Doe');
let page = doc.GetPage(0);
page.AddObject(stampAnnot);
console.log(`Stamp type is: ${stampAnnot.GetType()}`);