跳到主要内容

GetClassType

返回 ApiSquareAnnotation 类的类型。

语法

expression.GetClassType();

expression - 表示 ApiSquareAnnotation 类的变量。

参数

此方法没有任何参数。

返回值

"squareAnnot"

示例

识别 PDF 中方形框是哪种注释类型。

// How do I determine the annotation category of a square box in a PDF?

// Learn the specific kind of square annotation used in a PDF.

let doc = Api.GetDocument();
let squareAnnot = Api.CreateSquareAnnot([10, 10, 160, 32]);
let page = doc.GetPage(0);
page.AddObject(squareAnnot);
squareAnnot.SetBorderEffectStyle("cloud");
squareAnnot.SetBorderEffectIntensity(1);
console.log(`Annot class type is: ${squareAnnot.GetClassType()}`);