Download the PHP package crushjs/mini-pdf without Composer
On this page you can find all versions of the php package crushjs/mini-pdf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package mini-pdf
Mini PDF
A lightweight, fluent PDF generator for Laravel with first-class Khmer (ខ្មែរ) support.
Features
- Fluent, chainable API with
Paper/Orientationenums and apdf()helper - Return a PDF straight from a controller (it's
Responsable) - Khmer works out of the box: automatic script detection, correct shaping (subscripts, vowel re-ordering) and Khmer line breaking
- Use your own fonts (Battambang, Kantumruy Pro, Noto Sans Khmer…)
- Headers and footers with page numbers, watermarks, password protection, metadata
- Save to a local path or any filesystem disk (
s3,public, …) MiniPdf::fake()with test assertions@pageBreakBlade directive,when()/unless(), macros- Powered by mPDF, pure PHP: no Chrome, Node or binaries
Requirements
- PHP 8.2+
- Laravel 10, 11, 12 or 13
ext-mbstring,ext-gd
Installation
Optionally publish the config file:
Usage
Create a PDF
Output
Page setup
Headers, footers & page numbers
{PAGENO} and {nbpg} are replaced with the current page and the total page count. The body margins grow automatically so content never overlaps.
Force a new page in Blade:
Watermark, password & metadata
Conditionals & macros
Khmer support
Khmer text is detected automatically and rendered with full OpenType shaping (coeng subscripts, pre-base vowels, ្រ re-ordering) and dictionary-based line breaking, since Khmer has no spaces between words. Mixed Khmer and English content just works:
Khmer filenames are supported too: ->download('វិក្កយបត្រ.pdf').
Using a different Khmer font
mPDF ships with Khmer OS. To use another font, put the .ttf files in resources/fonts and register them in config/mini-pdf.php:
Custom fonts can also be used directly in CSS: font-family: battambang;.
Testing
Available assertions: assertDownloaded, assertStreamed, assertSaved, assertRendered, assertRenderedCount, assertNothingRendered, assertSee.
The fake still renders your Blade views (so broken templates fail the test) but skips PDF generation, so it's fast.
Advanced
Pass any mPDF option, or work with the mPDF instance directly:
License
MIT
mini-pdf
All versions of mini-pdf with dependencies
mpdf/mpdf Version ^8.2
illuminate/filesystem Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
illuminate/view Version ^10.0|^11.0|^12.0|^13.0