You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Publish the snappy's config file: php artisan vendor:publish --provider="Barryvdh\Snappy\ServiceProvider"
Open snappy's config file which is located at: config\snappy.php
Change pdf's binary value to: 'binary' => env('WKHTML_PDF_BINARY', base_path('vendor\wemersonjanuario\wkhtmltopdf-windows\bin\64bit\wkhtmltopdf.exe')),
Change image's binary value to: 'binary' => env('WKHTML_IMG_BINARY', base_path('vendor\wemersonjanuario\wkhtmltopdf-windows\bin\64bit\wkhtmltoimage.exe')),
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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