PHP code example of cointavia / html-to-pdf-converter

1. Go to this page and download the library: Download cointavia/html-to-pdf-converter 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/ */

    

cointavia / html-to-pdf-converter example snippets


return [
    'auth_token' => '**********',
    'user_token' => '**********'
];

use CointaviaPDF;

$fileName = "Sample File";
$htmlData = "<h1>Hello</h1><p>World</p>";

$pdfFile = CointaviaPDF::generatePDF($fileName,$htmlData);
sh
php artisan vendor:publish --provider="Cointavia\PDF\CointaviaPDFServiceProvider"