Download the PHP package clank-ai/rtf-converter without Composer
On this page you can find all versions of the php package clank-ai/rtf-converter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download clank-ai/rtf-converter
More information about clank-ai/rtf-converter
Files in clank-ai/rtf-converter
Package rtf-converter
Short Description A simple RTF to Plain Text Converter using regular expressions. Support for PHP, Python, Javascript and CSharp
License MIT
Informations about the package rtf-converter
Python, Javascript, PHP and C-Sharp RTF-Converter
RTF-Converter is a function that allows users to convert Rich Text Format (RTF) files into plain text using regular expressions.
Features:
Lightweight
Fast and efficient
Pure code, no external dependencies
Installation
Clone the repository:
git clone https://github.com/ClankDev/RTF-Converter.git
cd RTF-Converter
Install using pip:
pip install rtf-converter
Install using npm:
npm i rtf-converter
Install using composer:
composer require clank-ai/rtf-converter
Python - Example Usage
Convert a simple RTF string to plain text:
`
Python - Example Usage #2
Convert an RTF File to Plain Text
Read file from the disk, convert its content to plain text using the rtf_to_txt function, and then save the result to a new text file:
Python - Handling RTF Conversion Errors
In case the RTF content is not formatted correctly, the rtf_to_txt function might raise an exception. Here is how you can handle such errors gracefully:
JavaScript - Example Usage
Convert a simple RTF string to plain text:
JavaScript - Example Usage #2 (With error handling)
Convert an RTF File to Plain Text
Read file from the disk (or fetch from a server), convert its content to plain text using the rtfToTxt function, and then save the result to a new text file:
PHP - Example Usage
Convert a simple RTF string to plain text:
PHP - Example Usage #2
Convert an RTF File to Plain Text
Read file from the disk, convert its content to plain text using the rtfToTxt function, and then save the result to a new text file:
PHP - Handling RTF Conversion Errors
In case the RTF content is not formatted correctly, the rtfToTxt function might raise an exception. Here is how you can handle such errors gracefully:
C++ - Example Usage
Convert a simple RTF string to plain text:
C++ - Example Usage #2
Convert an RTF File to Plain Text
Read file from the disk, convert its content to plain text using the rtf_to_txt function, and then save the result to a new text file:
C++ - Handling RTF Conversion Errors
In case the RTF content is not formatted correctly, the rtf_to_txt function might throw an exception. Here is how you can handle such errors gracefully:
Contributing
Contributions, issues, and feature requests are welcome!
License
This project is licensed under the MIT License - see the LICENSE file for details.