PDF Export Using Snappy in Windows #3111
borhanuddin
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have been searching for days on how to setup PDF on my laravel 10.x and finally found this guide.
https://medium.com/@almestaadmicadiab/laravel-snappy-for-pdf-with-charts-e5c9b757d6dd
Rewriting that guide here for future reference and hope this will help others especially newbie like me.
Credits to the original owner.
composer require wemersonjanuario/wkhtmltopdf-windows 0.12.2.3
vendor\wemersonjanuario\wkhtmltopdf-windows
. We will need this later to setup snappy's config file.composer require barryvdh/laravel-snappy
php artisan vendor:publish --provider="Barryvdh\Snappy\ServiceProvider"
config\snappy.php
'binary' => env('WKHTML_PDF_BINARY', base_path('vendor\wemersonjanuario\wkhtmltopdf-windows\bin\64bit\wkhtmltopdf.exe')),
'binary' => env('WKHTML_IMG_BINARY', base_path('vendor\wemersonjanuario\wkhtmltopdf-windows\bin\64bit\wkhtmltoimage.exe')),
Yeah...and that's all.
Beta Was this translation helpful? Give feedback.
All reactions