PHP code example of elysio / easy-pdf

1. Go to this page and download the library: Download elysio/easy-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/ */

    

elysio / easy-pdf example snippets


use elysio\easypdf\EasyPdf;

$pdfGenerator = EasyPdf::init('path/to/views', 'path/to/cache');

$pdf = $pdfGenerator->makePdf('viewName', ['key' => 'value']);

$success = $pdfGenerator->savePdf($pdf, 'path/to/save/document.pdf');

$pdfGenerator->streamPdf($pdf, 'document.pdf');

$pdfGenerator = EasyPdf::init('custom/views', 'custom/cache');