Live redaction workflow
Review and permanently redact sensitive content
Select confidential text, mark every range for review, and create a PDF in which the original characters are removed rather than merely covered.
Mark the current selection
The gray highlight is a reversible review marker in the editable document.
CAREt
Selection start0
Length0
End0
Place the caret in the document and select sensitive text.
Finalize a secure PDF
This irreversible export removes marked characters and replaces their exact line geometry with black graphics.
0 MARKS
Review marksEditable
Redacted PDFPermanent
Redaction review
Locate a marked range in the document or remove its marker while keeping the original text.
0 CHARACTERS
Reading the document's redaction markers...
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
A highlight is not a secure redaction
Redaction has two distinct phases. Reviewers first identify sensitive ranges in the editable document. Finalization must then remove the underlying content so it cannot be selected, searched, copied, or recovered from the exported PDF.
Selected range
TXTextControl.selection
Review markers
TXTextControl.subTextParts
Marker lifecycle
SubTextPartCollection.add / remove
Permanent output
ServerTextControl.SubTextParts
How it works
Selection.getStart, Selection.getLength, and Selection.getText describe the browser selection. Selection indexes are zero-based, while the SubTextPartCollection.add start argument is one-based, so the marker starts at selectionStart + 1.
Each review range is stored as a named SubTextPart. Its gray HighlightMode.Always appearance makes the proposed redaction visible without changing the text. SubTextPart.scrollTo locates a range, and SubTextPartCollection.remove can discard the marker while preserving its characters.
Finalization is performed with ServerTextControl. The controller records all tx_redact ranges, removes their source text, measures each affected line, inserts opaque black SVG graphics with matching geometry, and exports the result as AdobePDF. Multi-line selections are processed one line at a time.
TXTextControl.subTextParts.add(
"tx_redact",
markerId,
selectionStart + 1,
selectionLength,
result => result.subTextPart.setHighlightMode(
TXTextControl.HighlightMode.Always),
showRedactionError);
var redactionParts = textControl.SubTextParts
.Cast<TXTextControl.SubTextPart>()
.Where(part => part.Name == "tx_redact")
.OrderBy(part => part.Start)
.ToList();
NuGet packages
TXTextControl.TextControl.Core.SDK
34.0.4
Provides the core document model and server-side document processing APIs.
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.4
Provides the browser-based TX Text Control document editor and JavaScript API.
dotnet add package TXTextControl.Web --version 34.4.0
TXTextControl.Web.DocumentEditor.Backend
34.4.0
Hosts the WebSocket-based backend used by the browser document editor.
dotnet add package TXTextControl.Web.DocumentEditor.Backend --version 34.4.0