laravel-pdf
Installation
SKILL.md
Laravel PDF
When to use this skill
Use this skill when the user needs to generate PDFs in a Laravel application using spatie/laravel-pdf. This includes creating PDFs from Blade views or HTML, formatting options (margins, orientation, paper size), returning PDFs as downloads or inline responses, saving to disks, testing PDF generation, and configuring drivers.
Creating PDFs
Create a PDF from a Blade view:
use Spatie\LaravelPdf\Facades\Pdf;
Pdf::view('pdf.invoice', ['invoice' => $invoice])
->save('/some/directory/invoice.pdf');
Create a PDF from raw HTML: