PHP code example of phil / paged-media-weasyprint

1. Go to this page and download the library: Download phil/paged-media-weasyprint 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/ */

    

phil / paged-media-weasyprint example snippets


$output = $this->pagedMedia->printHtml(new PrintableHtml($html, [$css], 'fr', 'The book'), 'book.pdf');