Constructor
new Annot()
Example
let pdfDoc; // PDFDoc实例
let pdfPage = await pdfDoc.getPageByIndex(0);
let annots = await pdfPage.getAnnots();
let annot = annots[0]; // 获取第一个注释
Methods
getBorderStyle() → {Promise.<number>}
- Description:
- 获取注释的边框样式。
Returns:
边框样式,参考 Constants.Border_Style 中定义的常量值
- Type
- Promise.<number>
getId() → {number}
- Description:
- 获取注释的ID。是 Annot#getObjectNumber 的别名。
Returns:
注释的ID
- Type
- number
getObjectNumber() → {number}
- Description:
- 获取注释的ID。
Returns:
注释的ID
- Type
- number
getPage() → {PDFPage}
- Description:
- 获取注释所属的PDFPage对象。
Returns:
返回注释所属的PDFPage对象
- Type
- PDFPage
getType() → {Constants.Annot_Type}
- Description:
- 获取注释的类型。
Returns:
注释类型
- Type
- Constants.Annot_Type
(async) setBorderStyle(borderStyle, styleParam) → {Promise.<void>}
- Description:
- 设置注释的边框样式。
Parameters:
| Name | Type | Description |
|---|---|---|
borderStyle |
number | 边框样式,参考 Constants.Border_Style 中定义的常量值 |
styleParam |
number | Array.<number> | 一个表示云朵强度的数字,或一个表示虚线模式的数组。 |
Returns:
- Type
- Promise.<void>
(async) setContent(content) → {Promise.<void>}
- Description:
- 设置注释的内容。
Parameters:
| Name | Type | Description |
|---|---|---|
content |
string | 注释内容字符串 |
Returns:
- Type
- Promise.<void>
(async) setRect(rect) → {Promise.<void>}
- Description:
- 设置注释的矩形区域。
Parameters:
| Name | Type | Description |
|---|---|---|
rect |
Rect | 矩形区域对象 |
Returns:
- Type
- Promise.<void>