跳到主要内容

CreateSquareAnnot

创建方形批注。

语法

expression.CreateSquareAnnot(rect);

expression - 表示 Api 类的变量。

参数

名称必需/可选数据类型默认值描述
rect必需Rect批注矩形。

返回值

ApiSquareAnnotation

示例

在 PDF 页面添加方形边框注释。

// How do I mark a region with a square box in a PDF?

// Display a square annotation at specified coordinates in a PDF.

let doc = Api.GetDocument();
let squareAnnot = Api.CreateSquareAnnot([10, 10, 160, 32]);
let page = doc.GetPage(0);
page.AddObject(squareAnnot);