--- id: striprtf version: "0.0.32" license: BSD-3-Clause license_treatment: permissive maintenance: active --- # striprtf — A simple library to convert rtf to text License: permissive · Maintenance: active · Downloads: 7.5M/mo ## What it is and what it does striprtf is a lightweight Python library that extracts plain text from Rich Text Format (RTF) documents by parsing and removing RTF control codes and formatting directives. It solves the problem of processing medical and other documents that are commonly stored in RTF format but need to be converted to plain text for further analysis or storage. The library provides a single primary function, rtf_to_text(), which accepts an RTF-encoded string and returns plain text. It supports customizable character encoding (defaulting to cp1252) and error handling modes, allowing users to work around encoding issues that may arise from malformed or non-standard RTF input. With no external runtime dependencies, it installs and runs with minimal friction. Use it for: - Extract text from medical documents stored in RTF format for downstream NLP or data analysis - Batch convert legacy RTF files to plain text for archival or migration to modern formats - Parse RTF content in data pipelines where only plain text is needed, discarding formatting - Handle encoding edge cases in RTF files using custom encoding parameters or error modes - Integrate RTF-to-text conversion into document processing workflows without heavy dependencies ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts Rich Text Format (RTF) files to plain text, stripping formatting and control codes to produce readable output suitable for parsing and processing. Yes. striprtf is a focused, dependency-free tool for a specific problem (RTF-to-text conversion) with active maintenance, permissive licensing, and no known vulnerabilities. Install it if you need to process RTF files; skip it if your documents are already in plain text or modern formats. ## Install pip install striprtf uv add striprtf poetry add striprtf ## Installing striprtf Before you install: Low install friction with no runtime dependencies. Actively maintained with recent commits and a stable release history since 2018. Supports current Python versions (3.8+). License in practice: BSD-3-Clause permissive license allows commercial and private use with minimal restrictions, requiring only license and copyright notice preservation. Quickstart: pip install striprtf from striprtf.striprtf import rtf_to_text rtf = "some rtf encoded string" text = rtf_to_text(rtf) print(text) Verify before relying: - Whether encoding parameter behavior differs meaningfully across Python versions or RTF variants - Performance characteristics on large RTF files or batch processing scenarios - Completeness of RTF standard coverage (which RTF features are preserved vs. stripped) ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 7.5M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags rtf to text conversion, strip rtf formatting, convert rtf files, rtf parser, remove rtf markup, rtf decoder, plain text from rtf, document-conversion, text-extraction, rtf-parsing [View on SkillFed](https://skillfed.io/packages/striprtf) · [View on PyPI](https://pypi.org/project/striprtf/)