This repo contains the example Blazor application which performs redaction smartly using Blazor PDF Viewer and AI.
Here, the sample demonstrates how the Syncfusion® Blazor PDF Viewer can intelligently redact sensitive information using AI assistance.
- In
Program.cs
, add your valid Syncfusion® license.
- In
AzureOpenAI.cs
, add your endpoint and deployment name.
- In
SmartRedact.razor
, add your Azure OpenAI key.
- Running the sample will render the PDF Viewer and load a default PDF document, as shown in the below image.
- The Smart Redact button opens a pane at the right side, allowing for smart redaction.
-
Choose the sensitive patterns to redact from the smart redaction pane and then click the Scan button.
-
The sensitive values for the selected patterns will be displayed in the tree view, and are selected by default.
- You can check or uncheck the values to redact. Checked values will be highlighted by a rectangle.
- The Redact button will be enabled if any value is ready to be redacted. Click the Redact button to redact the highlighted content.
- Additionally, if the document contains any sensitive information that is not detected by the smart redaction, you can manually redact using the Mark for Redaction option.
-
Click the Mark for Redaction button in the toolbar, then draw a rectangle over the content you want to redact.
-
You can mark multiple content as needed.
-
Click the Redact button to reload the redacted document into the viewer.