PrizmDoc v13.1 - Updated
Use Redaction Reasons
End User Guides > Viewer Guide > How To Examples > Redact Documents > Use Redaction Reasons

Redaction reasons allow redacted content to be replaced with a redaction reason that can be configured by the application developer.

What happens to the redaction reasons text:

Redaction reasons are located under the Redaction menu:

Redaction Reasons are not viewable when the Redaction View Mode is turned on.

To Add & Save a Redaction Reason to a Document

Redaction reasons are available with the Filled Rectangle and Text Selection redactions. The following instructions use the Text Selection redaction.
  1. Click on the Text Selection redaction icon:

  1. Select the text you want to redact and a context menu displays:

  1. Hover over the context menu and the available options display:

  1. Select the Redaction Reason you want to use or select Enter a reason... to create your own custom redaction reason:

If you hover over the redaction, it is transparent. Note that the redaction reason text is displayed in the redacted area. If there are multiple lines of redacted text, the reason is displayed on each line of text.
  1. To edit the Redaction Reason, click on the Redaction and the Comments menu displays:

Click the drop-down to select another Redaction Reason or edit the Custom Reason. You can also add a comment or delete the Redaction from the Comments menu.

  1. When you are ready to save your redactions and annotations, click the Save icon:

  1. The Save As field displays on the left-hand side of the Viewer:

  1. Enter a name for the redaction and click Save.  

How to Load Redaction Reasons

Redaction reason data is automatically loaded from a file named "redactionReason.json" located at the root of each sample provided. If the redaction reason functionality is not needed, then removing this file will disable the ability to add reasons to redactions in the Viewer.  

How to Set a Default Redaction Reason

To set a default redaction reason:

  1. Open the redactionReason.json file.
  2. Edit the reasons property so at most one item has a property called "defaultReason" set to the value of "true". If more than one item is set as default, then an error will be displayed when the Viewer loads.

The following example shows a reason set as the default in the redactionReason.json file:

Example
Copy Code
...
{"reason": "Content is removed from this section.", "defaultReason": true}
...

How to Automatically Apply Redaction Reasons

When the Viewer loads, the values from the redactionReason.json file will be read and viewer options will be appropriately set. If a"autoApplyDefaultReason" is set to true, then newly created rectangle or text selection redaction marks will automatically display the selected default reason text. If the "enableRedactionReasonSelection" is set to true then the reasons listed in the file will be made available as selectable options in the Viewer interface when creating or updating rectangle or text selection redaction marks. If the "enableRedactionReasonSelection" is set to false, then users will not be able to modify the default reason after it has been applied.

JSON Input for Setting Up Redaction Reasons

Use the following example to set up redaction reasons:

Example
Copy Code
{
    "autoApplyDefaultReason": true,
    "enableRedactionReasonSelection": true,
    "enableFreeformRedactionReasons": true,
    "maxLengthFreeformRedactionReasons": 40,
    "reasons": [
        {"reason": "Content is removed from this section.", "defaultReason": true}
        ,{"reason": "Sensitive data removed from the document."}
        ,{"reason": "Confidential."}
       
    ]
}

The following table shows the name, type and description available: 

Name Type Description
autoApplyDefaultReason boolean When set to true, default redaction reason will be automatically applied when mark is created. If this property is not provided it will be considered as false.
enableRedactionReasonSelection boolean When set to true, the redaction reasons will be loaded into the Viewer and available for the end user to select the reason from the list. If this property is not provided it will be considered as true.
enableFreeformRedactionReasons boolean When set to true, users are no longer limited to the preset list of reasons, instead, they are able to type any redaction reason.
maxLengthFreeformRedactionReasons int When used with the "enableFreeformRedactionReasons" property, this parameter will limit the length of the reason that a user can type.

The following table shows how the options in the JSON file affect what tabs are displayed in the redaction reason context menu:

enableRedactionReasonSelection autoApplyDefaultReason Reason Dropdown Tab Font Tab
true true displayed displayed
true false displayed displayed
false true hidden displayed
false false hidden hidden