PHP code example of ensepar / html2pdf-bundle

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

    

ensepar / html2pdf-bundle example snippets


Ensepar\Html2pdfBundle\EnseparHtml2pdfBundle::class => ['all' => true],

class Html2Pdf
{
    /**
     * @Route("/create")
     */
    public function create(Html2pdfFactory $html2pdfFactory)
    {

        $html2pdf = $html2pdfFactory->create();
    }
}

$html2pdf = $this->get('html2pdf_factory')->create();

$html2pdf = $this->get('html2pdf_factory')->create('P', 'A4', 'en', true, 'UTF-8', [10, 15, 10, 15]);