PdfRedactionAnnotation
12 Sep 20252 minutes to read
PdfRedactionAnnotation class represents the redaction annotation objects.
// Load an existing PDF document
let document: PdfDocument = new PdfDocument(data, password);
// Get the first page
let page: PdfPage = document.getPage(0) as PdfPage;
// Create a new redaction annotation
const annotation: PdfRedactionAnnotation = new PdfRedactionAnnotation (50, 100, 100, 50);
// Add annotation to the page
page.annotations.add(annotation);
// Destroy the document
document.destroy();Properties
appearanceFillColor number[]
Gets the appearance fill color of the annotation.
author string
Gets the author of the annotation.
border PdfAnnotationBorder
Gets the border of the annotation.
borderColor number[]
Gets the border color of the annotation.
bounds Object
Gets the bounds of the annotation.
boundsCollection Array
Gets the bounds collection of the annotation.
caption PdfAnnotationCaption
Gets the caption of the annotation.
color number[]
Gets the fore color of the annotation.
comments PdfPopupAnnotationCollection
Gets the comments of the PDF annotation (Read only).
creationDate Date
Gets the creation date of the annotation.
flags PdfAnnotationFlag
Gets the flags of the annotation.
flatten boolean
Gets the boolean flag indicating whether the annotation have been flattened or not.
flattenPopups boolean
Gets the boolean flag indicating whether annotation’s popup have been flattened or not.
font PdfFont
Gets the font of the annotation.
innerColor number[]
Gets the inner color of the annotation.
layer PdfLayer
Gets the PdfLayer of the annotation.
modifiedDate Date
Gets the modification date of the annotation.
name string
Gets the name of the annotation.
opacity number
Gets the opacity of the annotation.
overlayText string
Gets the overlay text of the annotation.
repeatText boolean
Gets the boolean flag indicating whether annotation has repeat text or not.
reviewHistory PdfPopupAnnotationCollection
Gets the review history of the PDF annotation (Read only).
rotate number
Gets the rotation angle of the annotation (Read only).
rotationAngle PdfRotationAngle
Gets the rotation of the annotation.
subject string
Gets the subject of the annotation.
text string
Gets the text of the annotation.
textAlignment PdfTextAlignment
Gets the text alignment of the annotation.
textColor number[]
Gets the text color of the annotation.
Methods
getValues
Gets the values associated with the specified key.
| Parameter | Type | Description |
|---|---|---|
| name | string |
Key. |
Returns string[]
setAppearance
Set the boolean flag to create a new appearance stream for annotations.
| Parameter | Type | Description |
|---|---|---|
| value | boolean |
Set appearance. |
Returns void
setValues
Sets the values associated with the specified key.
| Parameter | Type | Description |
|---|---|---|
| name | string |
Key. |
| value | string |
Value associated with the key.. |
Returns void