PdfWidgetAnnotation
class represents the widget annotation objects.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Access first page
let page: PdfPage = document.getPage(0);
// Access the annotation at index 0
let annotation: PdfWidgetAnnotation = page.annotations.at(0) as PdfWidgetAnnotation;
// Save the document
document.save('output.pdf');
// Destroy the document
document.destroy();
string
Gets the author of the annotation.
number[]
Gets the back color of the annotation.
PdfAnnotationBorder
Gets the border of the annotation.
number[]
Gets the border color of the annotation.
Object
Gets the bounds of the annotation.
PdfAnnotationCaption
Gets the caption of the annotation.
number[]
Gets the fore color of the annotation.
Date
Gets the creation date of the annotation.
PdfAnnotationFlag
Gets the flags of the annotation.
boolean
Gets the boolean flag indicating whether the annotation have been flattened or not.
boolean
Gets the boolean flag indicating whether annotation’s popup have been flattened or not.
PdfFont
Gets the font of the item.
PdfHighlightMode
Gets the highlight mode of the annotation.
number[]
Gets the inner color of the annotation.
PdfLayer
Gets the PdfLayer
of the annotation.
Date
Gets the modification date of the annotation.
string
Gets the name of the annotation.
number
Gets the opacity of the annotation.
PdfPage
Gets the page object (Read only).
number
Gets the rotation angle of the annotation.
PdfRotationAngle
Gets the rotation of the annotation.
string
Gets the subject of the annotation.
string
Gets the text of the annotation.
PdfTextAlignment
Gets the text alignment of the annotation.
PdfFormFieldVisibility
Gets the visibility.
Gets the values associated with the specified key.
Parameter | Type | Description |
---|---|---|
name | string |
Key. |
Returns string[]
Set the boolean flag to create a new appearance stream for annotations.
Parameter | Type | Description |
---|---|---|
value | boolean |
Set appearance. |
Returns void
Sets the values associated with the specified key.
Parameter | Type | Description |
---|---|---|
name | string |
Key. |
value | string |
Value associated with the key.. |
Returns void