PHP code example of barbosaadriano / rtf-html-php
1. Go to this page and download the library: Download barbosaadriano/rtf-html-php 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/ */
barbosaadriano / rtf-html-php 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');