Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 78
  • 7.3k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-dompdf

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install laravel-dompdf in Claude Code

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

A

No 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 →

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.

laravel-dompdf Install

Add to stack

Loading.