跳到主要内容

CreateStampAnnot

创建图章批注。

语法​

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

expression - 表示 Api 类的变量。

参数​

名称必需/可选数据类型默认值描述
position必需Point | Rect注释左上角的位置。对于 Rect,仅使用 x1 和 y1。
type必需StampType图章类型
author可选string作者姓名
creationDate可选number创建日期(时间戳)

返回值​

ApiStampAnnotation

示例​

在 PDF 页面添加批准印章注释。

// 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);