Smart Redaction Using Syncfusion&Reg; Blazor PDF Viewer

Sample date Updated on Sep 12, 2025
blazor blazor-pdf-viewer blazor-ui-components blazor-wasm blazor-webassembly pdf-viewer pdf-viewer-component redaction smart-component syncfusion

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.

Before running the sample, ensure you enter the valid keys in the following files:

  • In Program.cs, add your valid Syncfusion® license.

    image

  • In AzureOpenAI.cs, add your endpoint and deployment name.

    image

  • In SmartRedact.razor, add your Azure OpenAI key.

image

Steps to run the sample:

  1. Running the sample will render the PDF Viewer and load a default PDF document, as shown in the below image.

    image

  2. The Smart Redact button opens a pane at the right side, allowing for smart redaction.

    image

  3. Choose the sensitive patterns to redact from the smart redaction pane and then click the Scan button.

  4. The sensitive values for the selected patterns will be displayed in the tree view, and are selected by default.

    image

  5. You can check or uncheck the values to redact. Checked values will be highlighted by a rectangle.

    image

  6. The Redact button will be enabled if any value is ready to be redacted. Click the Redact button to redact the highlighted content.

    image

  7. 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.

    image

  8. Click the Mark for Redaction button in the toolbar, then draw a rectangle over the content you want to redact.

    image

  9. You can mark multiple content as needed.

  10. Click the Redact button to reload the redacted document into the viewer.

    image

    image

Up arrow