Laravel Pdf
Generates beautiful, customizable PDF documents from Laravel applications using Spatie's robust library.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add laravel-pdf npx -- -y @trustedskills/laravel-pdf
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"laravel-pdf": {
"command": "npx",
"args": [
"-y",
"@trustedskills/laravel-pdf"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill allows Laravel applications to generate PDF documents. It leverages the power of PHP's mPDF library and provides a fluent interface for creating complex layouts, including support for headers, footers, and custom stylesheets. The resulting PDFs can be easily downloaded or saved directly from your application.
When to use it
- Generating invoices: Automatically create PDF invoices based on data stored in your database.
- Creating reports: Produce formatted reports containing data visualizations and tables for stakeholders.
- Sending contracts: Generate legally binding contracts in a standardized PDF format for clients.
- Exporting user data: Allow users to export their profile information or other relevant data as a PDF document.
Key capabilities
- Integration with Laravel's templating engine (Blade)
- Support for mPDF library
- Fluent interface for PDF creation
- Customizable headers and footers
- CSS styling support
Example prompts
- "Generate a PDF invoice for customer ID 12345."
- "Create a report showing sales data for the last quarter in PDF format."
- "Export user profile data as a PDF document, including their address and order history."
Tips & gotchas
- Ensure that the mPDF library is installed correctly within your Laravel environment. Refer to spatie/laravel-pdf’s documentation for installation instructions.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.