Creating redactions
Redactions can be created using the WebViewer UI or programmatically.
Creating redactions with the UI
To create a new redaction in WebViewer, click on the redaction tool icon to enter redaction mode. Next click and drag on the document to create a new redaction. Note that when creating a redaction on top of text, multiple rectangles are created, similar to when highlighting text.

Creating redactions programmatically
Redactions can be added to a document similarly to other annotations, by adding them to the AnnotationManager and redrawing. Redaction annotations have two differences compared to other annotation types.
setRect() should be used instead of setting
X,Y,Height, orWidthdirectlyThe redaction annotation constructor can take an options object that can be used to configure the annotation. There are a number of properties that can be set using the constructor:
StrokeColor: This is the border color of the redaction before it been applied. Defaults to red.FillColor: This is the fill color of the redaction after it been applied. Defaults to black.PageNumber: The page that the redaction should appear on.Rect: A Math.Rect object of the redaction area.Quads: An array of Math.Quad objects of to specify multiple redaction areas. IfQuadsare provided thenRectis not needed.
Last updated
Was this helpful?