CreateSquareAnnot
创建方形批注。
语法
expression.CreateSquareAnnot(rect);
expression - 表示 Api 类的变量。
参数
| 名称 | 必需/可选 | 数据类型 | 默认值 | 描述 |
|---|---|---|---|---|
| rect | 必需 | Rect | 批注矩形。 |
返回值
示例
创建方形注释并将其添加到页面。
// How do I create the square annot in a PDF document?
// Create the square annot and display the result in a PDF document.
let doc = Api.GetDocument();
let squareAnnot = Api.CreateSquareAnnot([10, 10, 160, 32]);
let page = doc.GetPage(0);
page.AddObject(squareAnnot);