PHP code example of betrisey / pdf-client

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

    

betrisey / pdf-client example snippets

 php

et\pdfConverter\pdfClient;

$pdf = new pdfClient([
	'url' => 'http://localhost/htmltopdf/',
	'authUrl' => 'http://localhost/htmltopdf/auth/token.php',
	'clientId' => '        ',
	'clientSecret' => '        '
]);

$pdf->fromFile('file.html');
$pdf->fromString('<h1>Content</h1>');
$pdf->fromUrl('google.com');
 php
$pdf->fromFile('file.html', '[email protected]', 'Suject', 'Content');
$pdf->fromFile('file.html', ['[email protected]', '[email protected]'], 'Suject', 'Content');