RedactionSettings
16 Dec 20254 minutes to read
Provides customization options for redaction annotations in the PDF Viewer.
The RedactionSettingsModel class extends PdfViewerShapeSettings and includes additional properties specifically designed to control the appearance and behavior of redaction annotations.
These settings include overlay text, fill color, font settings, and alignment, allowing users to configure how redacted content should be displayed in the PDF document.
This redaction customization feature shall be available only when the PDF Viewer is operating in Standalone Mode.
<div id="pdfViewer" style="height: 100%;width: 100%;"></div> let viewer: PdfViewer = new PdfViewer();
// Change the rectangle annotation settings.
viewer.redactionSettings = {
markerOpacity: 1,
markerBorderColor: '#ff0000',
markerFillColor: '#9c2592',
overlayText: 'Redact',
isRepeat: false,
fontColor: '#000',
fontColor: 16,
fontFamily: 'Helvetica',
textAlignment: 'Center',
fillColor: '#9c2592',
author: 'Guest',
thickness: 1,
annotationSelectorSettings: {
selectionBorderColor: '',
resizerBorderColor: 'black',
resizerFillColor: '#FF4081',
resizerSize: 8,
selectionBorderThickness: 1,
resizerShape: 'Square',
selectorLineDashArray: [],
resizerLocation: AnnotationResizerLocation.Corners | AnnotationResizerLocation.Edges,
resizerCursorType: null
},
minHeight: 0,
minWidth: 0,
maxWidth: 0,
maxHeight: 0,
isLock: false,
allowedInteractions: ['None'],
isPrint: true
};
viewer.appendTo("#pdfViewer");Properties
allowedInteractions AllowedInteraction[]
Gets or sets the allowed interactions for the locked rectangle annotations.
IsLock can be configured using rectangle settings.
Defaults to [‘None’]
annotationSelectorSettings AnnotationSelectorSettingsModel
specifies the annotation selector settings of the annotation.
author string
specifies the author of the annotation.
bound Rectangle
Get or set the bounds of the annotation.
customData object
specifies the custom data of the annotation.
disableConfirmationPopup boolean
If true, disables the default redaction confirmation popup.
fillColor string
Gets or sets the fill color of the redacted area.
fontColor string
Gets or sets the font color of the overlay text in the redaction annotation.
Specifies the color used for the overlay text displayed within the redacted area.
fontFamily string
Gets or sets the font family used for the overlay text in the redaction annotation.
Defines the font style of the overlay text that appears on the redacted area.
fontSize number
Gets or sets the font size of the overlay text in the redaction annotation.
This property determines the size of the overlay text displayed within the redacted area.
isLock boolean
specifies the locked action of the annotation.
isPrint boolean
specifies whether the individual annotations are included or not in print actions.
isRepeat boolean
Gets or sets a value indicating whether the overlay text should repeat to fill the redaction area.
markerBorderColor string
Gets or sets the border color of the redaction marker.
This property defines the color of the border surrounding the redaction area.
markerFillColor string
Gets or sets the fill color of the redaction marker.
This property defines the color used to fill the redaction area.
markerOpacity number
Gets or sets the opacity of the redaction marker.
This property controls the transparency of the redaction marker’s fill and border.
maxHeight number
specifies the minHeight of the annotation.
maxWidth number
specifies the maxWidth of the annotation.
minHeight number
specifies the minHeight of the annotation.
minWidth number
specifies the minWidth of the annotation.
overlayText string
Gets or sets the text to be displayed as an overlay in the redaction annotation.
Specifies the string that will appear over the redacted area.
pageNumber number
Get or set page number of the annotation.
subject string
specifies the subject of the annotation.
textAlignment TextAlignment
Gets or sets the alignment of the overlay text displayed in the redaction annotation.
This property defines how the overlay text is aligned within the bounds of the redaction area.
thickness number
specified the thickness of the annotation.