Super PDF Plugin for Craft CMS 4 / 5
Create PDF files from HTML or Twig templates with DomPDF. Twig-first API, storage/volume persistence, queue support, lifecycle events, and optional signed download URLs.
Requirements
- PHP 8.1 or higher
- Craft CMS 4.0 or 5.0
- DOM and MBString extensions (GD recommended)
Features
- Generate PDFs from HTML or Twig templates
- Output modes:
render,download,object,string,base64 - Save to Craft storage or an asset volume
- Optional signed, expiring storage download links
- Queue / async generation
- Email attachment helper
- Console
super-pdf/generatecommand - Header & footer HTML or Twig partials
- Page total placeholder (
SUPER_PDF_TOTAL_PAGES/{PAGE_COUNT}) - Lifecycle events (
beforeRender,afterRender,beforeSave,afterSave) - Encryption and permission flags
- Entry “Download PDF” CP action
- DomPDF 3 with configurable font/temp directories
Installation
composer require amici/craft-super-pdf
In the Control Panel, go to Settings → Plugins and click Install for Super PDF.
Quick usage
{% set html %}
<h1>Hello</h1>
{% endset %}
{{ craft.superpdf.html(html, { filename: "My_PDF" }) }}
{% set object = craft.superpdf.template("_pdf/invoice", {
filename: "invoice",
type: "object"
}, { entry: entry }) %}
{{ object.url }}
use amici\SuperPdf\Plugin as SuperPdf;
SuperPdf::$plugin->getPdf()->fromTemplate('_pdf/invoice', [
'filename' => 'invoice',
'type' => 'object',
], ['entry' => $entry]);
php craft super-pdf/generate --template=_pdf/invoice --filename=smoke --type=object
Documentation
- In-repo docs:
docs/README.md - Online: docs.amiciinfotech.com/craft-cms/super-pdf
Support
Standard
Plus $19/year after one year.
Installation Instructions
To install this plugin, copy the command above to your terminal.
1 Review All reviews
5/ 5
Active Installs
392
License
Craft
Last release
August 3, 2026
Activity (30 days)
0
Closed Issues
0
Open Issues
0
Merged PRs
0
Open PRs


