Skip to main content

GetClassType

Returns a type of the ApiLineAnnotation class.

Syntax

expression.GetClassType();

expression - A variable that represents a ApiLineAnnotation class.

Parameters

This method doesn't have any parameters.

Returns

"lineAnnot"

Example

Determine what type of annotation a line is in a PDF.

// How do I identify the category of a line annotation in a PDF?

// Check the classification of a line annotation in a PDF.

let doc = Api.GetDocument();
let lineAnnot = Api.CreateLineAnnot([10, 10, 160, 32], {x: 12, y: 12}, {x: 155, y: 30});
lineAnnot.SetEndStyle("openArrow");
let page = doc.GetPage(0);
page.AddObject(lineAnnot);
console.log(`Annot class type is: ${lineAnnot.GetClassType()}`);