Rasura

Redaction

Removing content, and then proving it is gone.

Removing

JavaScript
await doc.redact('Account 4417-9920')
// Redaction forces a full rewrite, so it saves through the document.
const { bytes } = await doc.save()

The glyphs are removed from the content stream and the surrounding text is left where it was, rather than closed up. That matters: text that slid left would move out from under whatever box was drawn over the original rectangle.

Redaction forces a full rewrite

This is enforced in code, not documentation. An incremental save appends a revision and leaves the original bytes earlier in the file, so the removal would be cosmetic and recoverable with a text editor.

Verifying

JavaScript
const verdict = await doc.verifyRedaction('Account 4417-9920')
verdict.clean // true
verdict.occurrences // 0
verdict.notChecked // ['image data', 'font subset glyphs']

The search runs over the saved bytes, decompressing streams, so it catches text that survived in a place the removal did not reach.

What it does not reach

notChecked is the important half of the verdict. Two gaps are known and reported on every redaction:

  • Image data. If the text is part of a scan, removing the text layer leaves the picture of it.
  • Font subset glyphs. A subset embedded for a redacted name still contains that name’s letterforms, which has been used for real de-anonymisation.

Treat a clean verdict as a bounded claim. If your threat model includes either of those, rasterise the region or rebuild the document.