laravel-dompdf
Skill by barryvdh
Guides AI assistants through generating PDFs in Laravel with the barryvdh/laravel-dompdf package. It covers downloads, streams, saved files, options, PDF/A and remote assets for developers building invoices or reports.
Install laravel-dompdf
Built from the published package, never by AI.
git clone --depth 1 https://github.com/barryvdh/laravel-dompdf /tmp/laravel-dompdf && mkdir -p ~/.claude/skills && cp -r /tmp/laravel-dompdf/resources/boost/skills/laravel-dompdf ~/.claude/skills/laravel-dompdfRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/barryvdh/laravel-dompdf /tmp/laravel-dompdf && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/laravel-dompdf/resources/boost/skills/laravel-dompdf ~/.gemini/antigravity-cli/skills/laravel-dompdfAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
The laravel-dompdf skill gives an AI assistant guidance for generating PDFs in a Laravel app with the barryvdh/laravel-dompdf package. It covers building PDFs with Pdf::loadView(), Pdf::loadHTML() and Pdf::loadFile(), and returning them with download(), stream(), save() or output(). It also covers setting paper size, options, and config/dompdf.php.
It also explains PDF/A mode, embedded files for Factur-X or Zugferd workflows, remote image loading, and font configuration. The skill is aimed at developers who create invoices, reports, or attachments in Laravel and need to debug DOMPDF output. It points the assistant to search-docs and package files such as config/dompdf.php and src/PDF.php, and lists common pitfalls such as disabled remote access and files outside the chroot.
Written from the project's SKILL.md and checked against it.
What it can do
- PDF generation from Blade viewsBuilds PDFs with Pdf::loadView(), Pdf::loadHTML() or Pdf::loadFile().
- Output methodsReturns PDFs as downloads, inline streams, saved files or raw bytes via download(), stream(), save() and output().
- Paper and option settingsSets paper size, orientation, DPI, default font and other DOMPDF options.
- Configuration publishingExplains publishing and overriding config/dompdf.php in a Laravel app.
- PDF/A modeEnables archival PDF/A output through config or setPdfA().
- Embedded files and XMPCovers addEmbeddedFile() and setAdditionalXmpRdf() for Factur-X or Zugferd style workflows.
- Remote asset loadingDescribes enabling remote images and trusted hosts in config/dompdf.php.
- Font troubleshootingAdvises checking font_dir, font_cache and font embedding when fonts render incorrectly.
- Response verificationLists checks for Content-Type, Content-Disposition and non-empty PDF bytes.
What you need
- A Laravel application
- The barryvdh/laravel-dompdf package
- CPDF backend for PDF/A and embedded file methods
Try asking
- Create a Laravel controller that downloads an invoice PDF from a Blade view
- Enable remote images in config/dompdf.php for my report PDF
- Set my DOMPDF export to A4 landscape and embed DejaVu Sans fonts
Good to know
- Remote access is disabled by default since package 3.x
- PDF/A and Factur-X methods require the CPDF backend
- Local files must stay inside the DOMPDF chroot
- DOMPDF HTML and CSS support is not the same as browser support
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: resources/boost/skills/laravel-dompdf/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md4 KB -
references/example.md3 KB -
references/package.md2 KB
Alternatives to laravel-dompdf
All alternatives →Lists live launchpad token feeds and AI-detected hot topics for meme tokens on BSC, Solana and Base. Covers new, finalizing and just-migrated tokens on launchpads such as Pump.fun and Four.meme.
The okx-market skill lets an AI assistant retrieve cryptocurrency market data from the OKX V5 REST API. It is aimed at users who want spot, derivatives and index data in Python without an account.
Calculates key SaaS health metrics such as ARR, churn, LTV and CAC from raw business numbers, then gives prioritized advice. Built for founders and finance leads who share revenue or customer figures.
Fetches U.S. SEC EDGAR data for research. It resolves a ticker to its CIK, lists recent filings with primary-document URLs, and pulls XBRL financial series. Built for analysts who need free, U.S.-only filing data.
Provides free, no-auth access to Eastmoney market data for A-shares, Hong Kong stocks and US stocks. It covers fund flows, dragon-tiger lists, financial statements and stock screening.
Reads and manages a user's QuickBooks business through Intuit's official MCP server. It answers finance questions from reports, invoices, customers, products and benchmarks, and completes approved actions.
Compare with meme-rush, okx-market or saas-metrics-coach
laravel-dompdf: common questions
Why are remote images not loading in my DOMPDF PDF?
Since package 3.x remote access is disabled by default. Enable it deliberately in config/dompdf.php when the PDF must load remote assets.
Which methods does laravel-dompdf provide for generating PDFs?
The source lists Pdf::loadView(), Pdf::loadHTML() and Pdf::loadFile() for building PDFs. Output uses download(), stream(), save() or output().
Does PDF/A work with every DOMPDF backend?
No. The source says PDF/A and the Factur-X related methods require the CPDF backend, and fonts should be embedded for PDF/A validation.
How do I install laravel-dompdf?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is laravel-dompdf free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is laravel-dompdf safe to use?
It scores 78 of 100. Grades: maintenance C, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to laravel-dompdf?
Similar skills: meme-rush, okx-market, saas-metrics-coach, sec-edgar.
