Installation
Requirements
- PHP 8.4 or newer
ext-mbstring,ext-zlibandext-domext-gd, but only if you need WebP, GIF, BMP or AVIF images (PNG and JPEG work without it)ext-zip, but only for Word export (quoin/docx)- Laravel 12 or 13, if you're using the Blade package
The core package has two Composer dependencies: dskripchenko/php-pdf, which writes the PDF files, and quoin/math, which builds equations and is released alongside it.
Installing
Install with Composer:
composer require quoin/laravel # Blade tags; pulls in quoin/core
composer require quoin/core # the engine alone
composer require quoin/docx # Word export; see Word exportLaravel discovers the service provider and the Quoin facade, so there's nothing to register.
quoin/docx pulls in quoin/core. In Laravel, ->docx() works once it's installed. See Word export.
Optional packages
These are suggested; none is required:
phiki/phikicolors the syntax in code blocks.bacon/bacon-qr-codedraws styled QR codes (dotted or rounded modules, eye shapes, colors, gradients).rsvg-convert(librsvg, a command-line program) draws SVG in Word export, without Imagick and more faithfully than most Imagick builds. Install it and give it the path, in Laravel withQUOIN_RSVG_CONVERTin.env.ext-imagickdraws styled QR codes (withbacon/bacon-qr-code) in Word export, and SVG whenrsvg-convertisn't set up; SVG needs an Imagick build that reads SVG. PDF and HTML don't use it.ext-gdalso helps in Word export, for WebP and AVIF images, imagecover, opacity and plain QR codes.
Checking your fonts
The Inter font, the Cousine monospace font and the STIX Two Math font for equations are bundled (all under the SIL Open Font License), so your first document renders without setup. In Laravel, list every available font:
php artisan quoin:fontsEach font file is reported as ok, missing or invalid. See Fonts to add your own.