PHP code example of thealgoslingers / php-rtf-to-pdf

1. Go to this page and download the library: Download thealgoslingers/php-rtf-to-pdf 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/ */

    

thealgoslingers / php-rtf-to-pdf example snippets


 
/*
 * --------- EXAMPLE USAGE ---------
 *
 * @brief PHP class for converting rtf to pdf
 * @version 1.0.0
 * @author Thealgoslingers
 * @twitter @thealgoslingers
 */

## autoload libs
.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);
index.php