PDF annot object.
More...
◆ exportToJSON()
Export annotation to a json object.
- Returns
- {object} - A json object of annotation's property. The key and value formats try to follow XFDF specifications
{
type: *,
color: {string},
flags: {string},
date:{stromg},
name: *,
page: (*|number),
rect: {string},
contents: (*|string),
width: borderWidth
}
◆ getBorderColor()
| Annot::getBorderColor |
( |
| ) |
|
|
inline |
Get annotation's border color.
- Returns
- {number} - An interge indecated border color will be returned.
◆ getBorderInfo()
Get annotation's border information.
- Returns
- {borderInfo|{cloudIntensity, dashPhase, dashes, style, width}} -
{
cloudIntensity:{number},
dashPhase:{number},
dashes:Array[number],
style:{number},
width:{numner}
}
◆ getContent()
Get annotation's contents.
- Returns
- {*|string} - Annotation's contents will be returned.
◆ getFlags()
Get annotation's flag.
- Returns
- {Promise.<T>|*}
-
{number} - Annotation flag number.
- See also
- Annot_Flags
◆ getModifiedDateTime()
| Annot::getModifiedDateTime |
( |
| ) |
|
|
inline |
Get annotation's last modified date time.
- Returns
- {Date|null} - A Date objet, If there is no modified date time information, null would be returned
◆ getPage()
Get annotation's page.
- Returns
- {PDFPage} - PDF page object.
◆ getRect()
Get annotation's rect.
- Returns
- {PDFRect} - A PDF rectangle.
{
left:{number},
top:{number},
right:{number},
bottom:{number}
}
◆ getTitle()
Get annotation's title.
- Returns
- {string} - A string indicates annotation's title.
◆ getType()
Get annotation's type.
- Returns
- {string} - A string indicates annotation's type.
◆ getUniqueID()
Get annotation's unique ID.
- Returns
- {string} - A string indicates annotation's unique ID.
◆ isEmpty()
Check annotation is empty or not.
- Returns
- {boolean|*} - Annotation is empty or not
◆ isMarkup()
Check if current annotation is a markup annotation.
- Returns
- {bool} - true means current annotation is a markup annotation, while false means current annotation is not a markup annotation.
◆ setBorderColor()
| Annot::setBorderColor |
( |
|
borderColor | ) |
|
|
inline |
Set annotation's border color.
- Parameters
-
| borderColor | {number} - An interge indecated border color. |
- Returns
- {Promise.<T>|*} - A boolean value indecated whether success.
◆ setBorderInfo()
| Annot::setBorderInfo |
( |
|
borderInfo | ) |
|
|
inline |
Set annotation's border information.
- Note
- For some sepecial case, unexpected result will happen. Such as: cloudy border is supported with polygon, square and circle annot; any style is unsupported with text markup,caret, stamp, ink and note annot;
- Parameters
-
| {borderInfo|{cloudIntensity,dashPhase,dashes,style,width}} | - Border infomation.
{ cloudIntensity:{number}, dashPhase:{number}, dashes:Array[number], style:{number}, width:{numner} }
|
- Returns
- {Promise.<T>}
◆ setContent()
| Annot::setContent |
( |
|
content | ) |
|
|
inline |
Set annotation's contents.
- Parameters
-
| content | {string} - New contents to be setted. |
- Returns
- {Promise.<Annot>} - Annotations modified will be returned.
◆ setFlags()
Set annotation's flag.
- Parameters
-
| flag | {number} - An Annot_Flags number indecate annotation's flag. |
- Returns
- {Promise.<T>|*} - A boolean value indecated success or failue.
◆ setModifiedDateTime()
| Annot::setModifiedDateTime |
( |
|
date | ) |
|
|
inline |
Set annotation's last modified date time.
- Parameters
-
| date | {Date|number} A Date object or an interge indecate million secounds from 1970.1.1 00:00:00. |
- Returns
- {Promise.<T>|*}