PHP code example of nass600 / snappy-service-provider

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

    

nass600 / snappy-service-provider example snippets




use Silex\Application;
use Nass600\Silex\Provider\SnappyServiceProvider;

$app = new Application();

$app->register(new SnappyServiceProvider(), array(
    'snappy.pdf.binary' => '/path/to/wkhtmltopdf',
    'snappy.pdf.options' => array(
        'footer-center' => 'page [page]'
    ),
    'snappy.image.binary' => '/path/to/wkhtmltoimage',
    'snappy.image.options' => array(
        'format' => 'png'
    )
));