CreateUnderlineAnnot
创建下划线批注。
语法
expression.CreateUnderlineAnnot(rect);
expression - 表示 Api 类的变量。
参数
| 名称 | 必需/可选 | 数据类型 | 默认值 | 描述 |
|---|---|---|---|---|
| rect | 必需 | Rect | Quad[] | 应用下划线的区域。 |
返回值
示例
在 PDF 中为标记的文本添加下划线注释。
// How do I underline text with an annotation in a PDF?
// Create an underline annotation at specified coordinates and add it to a page in a PDF.
let doc = Api.GetDocument();
let underlineAnnot = Api.CreateUnderlineAnnot([[85.04985826771654,56.70000000000001,229.27237795275593,56.70000000000001,85.04985826771654,70.9988031496063,229.27237795275593,70.9988031496063]]);
let page = doc.GetPage(0);
page.AddObject(underlineAnnot);