Skip to main content

GetRotation

Gets stamp rotate.

Syntax

expression.GetRotation();

expression - A variable that represents a ApiStampAnnotation class.

Parameters

This method doesn't have any parameters.

Returns

Degree

Example

Get rotate of stamp annotation in a PDF document.

// How can I get the rotation using a stamp annotation in a PDF document?

// Get the rotation for a stamp annotation in a PDF document.

let doc = Api.GetDocument();
let stampAnnot = Api.CreateStampAnnot([10, 10, 0, 0], 'D_Reviewed', 'Joe Doe');
let oldRotAngle = stampAnnot.GetRotation();
stampAnnot.SetScale(0.5);
stampAnnot.SetRotation(180);
let page = doc.GetPage(0);
page.AddObject(stampAnnot);
console.log(`We change stamp rotate angle from ${oldRotAngle} to: ${stampAnnot.GetRotation()}`);