Skip to main content

CreateStampAnnot

Creates stamp annotation.

Syntax​

expression.CreateStampAnnot(position, type, author, creationDate);

expression - A variable that represents an Api class.

Parameters​

NameRequired/OptionalData typeDefaultDescription
positionRequiredPoint | RectThe position of the upper-left corner of the annotation. For a Rect, only x1 and y1 are used.
typeRequiredStampTypestamp type
authorOptionalstringname of the author
creationDateOptionalnumbercreation date (timeStamp)

Returns​

ApiStampAnnotation

Example​

Add an approval stamp annotation to a PDF page.

// How do I mark a document with a stamp in a PDF?

// Place a preset stamp at specified coordinates in a PDF.

let doc = Api.GetDocument();
let stampAnnot = Api.CreateStampAnnot([40, 40, 100, 100], 'SB_Approved');
let page = doc.GetPage(0);
page.AddObject(stampAnnot);