PHP code example of eve / pdf-converter

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

    

eve / pdf-converter example snippets


public function __construct(private \Eve\PdfConverter\PdfConverterInterface $converter) 
{
    $this->converter->configure('key', 'value');
    
    // returns an \Illuminate\Http\File instance
    $this->converter->convertHtml('<p>Hello World</p>', '/path/to/output/file.pdf');
}

public function generateInvoice(): void
{
    \PdfConverter::configure('key', 'value');
    \PdfConverter::convertHtml('<p>Free of charge</p>', '/my/invoice.pdf');
}

$converter->configure(array|string $key, ...$values);
bash
php artisan vendor:publish --provider="Eve\PdfConverter\ServiceProvider"