SearchAndRedact
Searchs words and adds redact to it.
Syntax
expression.SearchAndRedact(props);
expression - A variable that represents a ApiDocument class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| props | Required | SearchProps | No description provided. |
Returns
Example
Search some word in document and add a redact annotation to it.
// How can I search and redact using a document in a PDF document?
// Search and redact for a document in a PDF document.
let doc = Api.GetDocument();
doc.SearchAndRedact({text: "Lorem", matchCase: false, wholeWords: false});
doc.ApplyRedact();
console.log(`We searched for the word lorem in the document and applied redact annotation to all matches.`);