Repository navigation
Redactions & PII Sanitization
costacloud edited this page Aug 13, 2026
·
1 revision
TeamSync PDF Viewer provides military-grade binary vector redaction and DOM text layer sanitization.
Unlike primitive viewers that place black HTML boxes on top of canvas, TeamSync PDF Viewer permanently rasterizes redacted regions into the PDF vector stream and strips underlying text from the DOM.
Pass custom regular expressions to automatically locate and redact sensitive PII (Aadhaar, SSN, Credit Cards, Dates of Birth):
WebViewer({
initialDoc: '/contract.pdf',
regexRedactions: [
/\d{4} \d{4}(?= \d{4})/g, // Aadhaar / SSN 8-digit mask
/DOB: \d{2}\/\d{2}\/\d{4}/g // Date of Birth mask
]
}, container);Users can discard pending unapplied redactions at any time:
-
Clicking the
XBadge: Every unapplied redaction box on the PDF page displays a redXbadge to immediately remove it. - "Discard Redactions" Toolbar Button: Appears in the redactions toolbar when pending redactions exist.
- Confirmation Modal: A secondary Discard Redactions button inside the "Apply Redactions" modal allows discarding marked areas.