RTF Extraction
Agent Mask extracts plain text from RTF documents, detects configured PII entities in the extracted text, and returns de-identified text from the same mask() call.
RTF inputs return de-identified extracted text, not an edited .rtf file. Rich-text formatting is stripped during extraction, and no redacted RTF binary is returned.
RTF bytes must be base64-encoded and zlib-compressed before passing them to mask().
Quick example
Section titled “Quick example”-- RTF bytes must be base64-encoded and zlib-compressed.SELECT app_public.mask( '<compressed_base64_rtf>');The response includes:
columns[0].deidentified_text- de-identified extracted text.columns[0].original_text- extracted source text before replacement.columns[0].document_metadata.file_type-rtf.
Encoding
Section titled “Encoding”RTF code pages are read from the document header when present. If no code page is available, the extractor falls back to the standard RTF ANSI default.
What gets de-identified
Section titled “What gets de-identified”Detected PII in the extracted plain text is replaced with the operator-determined value, such as [PERSON_1], [REDACTED], a hash, or a faker value.
Embedded objects, images, formatting instructions, and other rich-text structure are not redacted as an RTF file. Use RTF extraction when the workflow needs de-identified text, not a visually redacted document.
When to use
Section titled “When to use”- Older notes or reports stored as
.rtf. - Text-only de-identification where preserving the original rich-text formatting is not required.
- ZIP archive processing where RTF files are mixed with text, PDF, or image files.
Review and limitations
Section titled “Review and limitations”RTF extraction depends on the text that can be read from the RTF body. If sensitive values are stored in embedded images, unsupported objects, or formatting that does not extract to plain text, they are not present in the returned deidentified_text.
For external sharing, regulated disclosure, or public release, review the extracted original_text, analyzer results, and de-identified output against your workflow requirements.