Use SnappyPDF to export PDF in Laravel

Packages wkhtmltopdf is an open source (LGPLv3) command line tool to render HTML into PDF. It runs entirely “headless” and do not require a display or display service. Snappy (KnpLabs/snappy) is a PHP wrapper for wkhtmltopdf. barryvdh/laravel-snappy is a Laravel ServiceProvider for Snappy. Notes for DOMPDF: DOMPDF only supports limited CSS, therefore it is not ideal for HTML-to-PDF exports that contain advanced CSS style (grid, flex, etc.). Steps Download the correct wkhtmltopdf version based on the operating system (for example: Windows - Installer (Vista or later) - 64-bit for Windows 10) to a preferred path (usually in vendor folder)....

2021-12-09 · 1 min