Apryse offers PDF Redaction, a safe and secure removal of content on document formats such as PDF. This guide will help you utilize all of Apryse's Redaction capabilities in Webviewer alongside Salesforce Lightning Components.
We recommend familiarizing yourself with the Overview page to learn how to correctly use a config.js
file. If you are using a version of WebViewer older than 8.0+
, you should also learn about readerControl
before getting started.
In your LWC where you initialize WebViewer (you can check out pdftronWvInstance.js
in our sample repository). This shows you how to enable redaction:
Note: You need to use the pdf_full.zip
file in your /staticresources/
folder to access full API, which is required for redaction.
To perform redaction on a document, open it in WebViewer. Check opening documents guide to learn more.
Review creating redaction guide for creating redactions with the WebViewer UI.
You can use search to highlight single or all occurences of a search term. You may also use regular expressions, which allows to target e-mail addresses, phone numbers, credit card numbers, etc. See more in our searching documents guide.
When performing your search, add a searchListener
that marks your search results for redaction like so:
Then run your search using either instance.searchText(searchTerms, searchOptions)
or instance.searchTextFull(searchTerms, searchOptions)
. Once you have the desired search term(s) highlighted, you can call instance.Core.documentViewer.getAnnotationManager().applyRedactions();
to redact these items.
Review the guide for creating redaction for more on creating redactions programmatically.
You can review the Salesforce PDF App to showcase an end-to-end example of search, and how you can leverage it for redaction and content replacing on our Github repository.
Check out this live redaction demo (hosted outside of Salesforce).
Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales