Skip to content

Commit

Permalink
Add pdf redaction configuration docs.
Browse files Browse the repository at this point in the history
Fixes #181.
  • Loading branch information
JessieAMorris committed Dec 19, 2024
1 parent 9ed2e7c commit fd6cade
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/docs/filter_policies/pdf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# PDF Redaction Configuration

PDF redaction can be configured through the `config.pdf` path of a policy.

The available options are:

| Key | Type | Default | Description |
|--------------------------|-----------|-------------|-----------------------------------------------------------------------------------------------------------------------------------|
| `redactionColor` | `string` | `black` | This is the color of the redaction boxes that are drawn over the PII. Available options are `white`, `black`, `red`, and `yellow` |
| `showReplacement` | `boolean` | `false` | If `true` then the output of the filter's strategy will be output on the redaction box in the PDF |
| `replacementFont` | `string` | `helvetica` | The font to use for the replacement output. Available options are `helvetica`, `times`, and `courier` |
| `replacementMaxFontSize` | `float` | `12` | The maximum font size for the replacement text. Best efforts will be made to fit the replacement text within the redaction box |
| `replacementFontColor` | `string` | `white` | The font color for the replacement. Available options match the `redactionColor` options |

### An Example PDF Configuration Policy

The following is an example policy setting the PDF redaction options.

```
{
"name": "example-pdf-policy",
"identifiers": {
"emailAddress": {
"emailAddressFilterStrategies": [
{
"strategy": "REDACT",
"redactionFormat": "{{{REDACTED-%t}}}"
}
]
}
},
"config": {
"pdf": {
"redactionColor": "red",
"showReplacement": true,
"replacementFontColor": "yellow"
}
}
}
```

0 comments on commit fd6cade

Please sign in to comment.