PHP code example of kekos / booya-pdf

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

    

kekos / booya-pdf example snippets



use Booya\Controller;
use Booya\FileTemplate;
use Booya\Pdf\PdfResponse;

class MyPdfController extends Controller {

  public function index() {
    $this->response = new PdfResponse();

    $content_template = new FileTemplate(ROOT . '/src/view/my_pdf_content');
    $this->response->addTemplate($template);
  }
}