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();stringGets the author of the annotation.
number[]Gets the back color of the annotation.
PdfAnnotationBorderGets the border of the annotation.
number[]Gets the border color of the annotation.
ObjectGets the bounds of the annotation.
PdfAnnotationCaptionGets the caption of the annotation.
number[]Gets the fore color of the annotation.
DateGets the creation date of the annotation.
PdfAnnotationFlagGets the flags of the annotation.
booleanGets the boolean flag indicating whether the annotation have been flattened or not.
booleanGets the boolean flag indicating whether annotation’s popup have been flattened or not.
PdfFontGets the font of the item.
PdfHighlightModeGets the highlight mode of the annotation.
number[]Gets the inner color of the annotation.
PdfLayerGets the PdfLayer of the annotation.
DateGets the modification date of the annotation.
stringGets the name of the annotation.
numberGets the opacity of the annotation.
PdfPageGets the page object (Read only).
numberGets the rotation angle of the annotation.
PdfRotationAngleGets the rotation of the annotation.
stringGets the subject of the annotation.
stringGets the text of the annotation.
PdfTextAlignmentGets the text alignment of the annotation.
PdfFormFieldVisibilityGets 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