thealgoslingers / php-rtf-to-pdf
This package can convert rtf file to pdf
Installs: 100
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/thealgoslingers/php-rtf-to-pdf
Requires
- henck/rtf-to-html: ^1.2
 - tecnickcom/tcpdf: ^6.6
 
Requires (Dev)
- phpunit/phpunit: ^5.7
 
README
Convert rtf to pdf
Installation
  composer require thealgoslingers/php-rtf-to-pdf
Example usage
 <?php
/*
 * --------- EXAMPLE USAGE ---------
 *
 * @brief PHP class for converting rtf to pdf
 * @version 1.0.0
 * @author Thealgoslingers
 * @twitter @thealgoslingers
 */
## autoload libs
require_once "vendor/autoload.php";
use thealgoslingers\RtfToPdf;
/*
 * Go check samples folder
 * a new output.pdf file will be created
 * after running this script
 */
 
## the rtf file path
$rtf_file_path = "samples/sample.rtf";
## path to save the new pdf file 
$path_to_save_output = "samples/output.pdf";
## start converting the rtf file
$rtfpdf = new RtfToPdf($rtf_file_path);
## output the pdf file
$rtfpdf->output($path_to_save_output);
?>
This code is the same as in the index.php file
Use that file instead of copying from here