Join us for an engaging webinar, as we unravel the potential of AI for revolutionizing document management.
Watch Now
Enable your employees to remain productive throughout the document management process.
Read More
Learn how SmartZone uses a regular expression engine integrated into the recognition engine to achieve the best possible accuracy on data that can be defined by a regular expression.
Docubee is an intelligent contact automation platform built to help your team success
How can I annotate or redact search results within PrizmDoc? What annotation or redaction types are supported? How can I change the properties of the created marks?
You can annotate or redact search results using the addMarkFromSearchResult() function from ViewerControl. This function creates a new mark of a specific type and adds it to the location where the specified search result is.
addMarkFromSearchResult()
ViewerControl
The addMarkFromSearchResult() supports mark types: TextSelectionRedaction, HighlightAnnotation, StrikethroughAnnotation and TextHyperlinkAnnotation.
TextSelectionRedaction
HighlightAnnotation
StrikethroughAnnotation
TextHyperlinkAnnotation
The addMarkFromSearchResult() function takes two arguments: searchResult and markType. The searchResult is the search result that you want to annotate/redact and markType is the type of mark that will be created.
searchResult
markType
To perform a search and redact the search results, use the following example:
var requestObject = PCCViewer.search('Con'); var marks = []; var mark; requestObject.on(PCCViewer.EventType.SearchCompleted, function (event) { var searchResults = event.completedSearchResults; for (var i = 0; i < searchResults.length; i++) { mark = viewer.viewerControl.addMarkFromSearchResult(searchResults[i], PCCViewer.Mark.Type.TextSelectionRedaction); marks.push(mark); } });
To create a different annotation type from a search result you would change the second argument to the different type. For example, if you wanted a textHyperLinkAnnotation you could do the following:
textHyperLinkAnnotation
mark = viewer.viewerControl.addMarkFromSearchResult(result, PCCViewer.Mark.Type.TextHyperlinkAnnotation);
Changing the properties of the mark is fairly straightforward. To set the fill color and the URL string in the TextHyperlinkAnnotation, you would add this after creating the mark:
mark.setHref("https://www.accusoft.com"); mark.setFillColor("#FF0000");
More information on mark types and their properties can be found in our documentation here.