PHP code example of henck / rtf-to-html
1. Go to this page and download the library: Download henck/rtf-to-html library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
henck / rtf-to-html example snippets
use RtfHtmlPhp\Document;
$rtf = file_get_contents("test.rtf");
$document = new Document($rtf); // or use a string directly
echo $document;
use RtfHtmlPhp\Html\HtmlFormatter;
$formatter = new HtmlFormatter();
echo $formatter->Format($document);
$formatter = new HtmlFormatter('UTF-8');