snappy + wkhtmltopdf setup

https://github.com/barryvdh/laravel-snappy

composer require barryvdh/laravel-snappy

// windows
composer require wemersonjanuario/wkhtmltopdf-windows

config/app.php

'PDF' => Barryvdh\Snappy\Facades\SnappyPdf::class,
'SnappyImage' => Barryvdh\Snappy\Facades\SnappyImage::class,

https://github.com/KnpLabs/snappy#wkhtmltopdf-binary-as-composer-dependencies

composer require h4cc/wkhtmltopdf-amd64 0.12.x
composer require h4cc/wkhtmltoimage-amd64 0.12.x

config/snappy.php

<?php
return array(
'pdf' => array(
'enabled' => true,
'binary' => base_path(env('SNAPPY_WKHTMLTOPDF_PATH', 'vendor/wemersonjanuario/wkhtmltopdf-windows/bin/64bit/wkhtmltopdf')),
'timeout' => false,
'options' => array(),
'env' => array(),
),
'image' => array(
'enabled' => true,
'binary' => base_path(env('SNAPPY_WKHTMLTOIMAGE_PATH', 'vendor/wemersonjanuario/wkhtmltopdf-windows/bin/64bit/wkhtmltoimage')),
'timeout' => false,
'options' => array(),
'env' => array(),
),
);

.env

SNAPPY_WKHTMLTOPDF_PATH="vendor/h4cc/wkhtmltopdf-amd64/bin/wkhtmltopdf-amd64"
SNAPPY_WKHTMLTOIMAGE_PATH="vendor/h4cc/wkhtmltoimage-amd64/bin/wkhtmltoimage-amd64"