| Recommend this page to a friend! | 
|  Download | 
| Info | Example |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not enough user ratings | Total: 56 | All time:  10,587 This week: 43  | ||||
| Version | License | PHP version | Categories | |||
| php-rtf-to-pdf 1.0.0 | MIT/X Consortium ... | 5 | PHP 5, Files and Folders, Documents | 
| 
<?php | 
Convert rtf to pdf
  composer require thealgoslingers/php-rtf-to-pdf
 <?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
|  Files (7) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  samples (1 file) | ||||
|  src (1 file) | ||||
|    composer.json | Data | Auxiliary data | ||
|    composer.lock | Data | Auxiliary data | ||
|    index.php | Example | Example script | ||
|    LICENSE | Lic. | License text | ||
|    README.md | Doc. | Read me | ||
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
|  Install with Composer | 
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% | 
 | 
 | 
| Applications that use this package | 
 If you know an application of this package, send a message to the author to add a link here.
 If you know an application of this package, send a message to the author to add a link here.