Fagus documentation
Fagus turns HTML and CSS into PDF for PHP and Laravel, the way Chrome prints them, without a browser. Start with Getting started; the other pages are references to look things up in.
Using Fagus#
- Getting started: requirements, installing the Composer package, the first PDF in PHP and in Laravel.
- PHP API: documents, the PDF they render to, the engine, diagnostics and exceptions.
- Laravel: the facade, Blade views, responses, disks, queues, Octane and the configuration.
- Resources: where images, style sheets, fonts and frames come from, and what Fagus never loads.
- Deployment: Docker, Alpine, servers without access to GitHub, binaries of your own, worker processes, speed and memory.
- Troubleshooting: error messages, diagnostics, differences from Chrome, and moving from Dompdf, mPDF, Browsershot or Snappy.
Writing documents#
- CSS reference: what Fagus supports, what it does differently from Chrome and what it does not support.
- Paged media: page sizes and margins, headers and footers, page numbers, page breaks, tables across pages, tables of contents, print shop marks.
- Fonts: the built-in font, font directories,
@font-face, system fonts, fallback, OpenType features and languages. - Extensions: what Fagus adds where CSS has no way, such as carry-over rows in tables that break across pages.
The PDF#
- The PDF: metadata, links and the outline, tagged and accessible PDF (PDF/UA), PDF/A, attachments, electronic invoices (ZUGFeRD, Factur-X, XRechnung), reproducible output.
Without PHP#
- Command line: the
fagusbinary. - Rust library: the engine as a Rust crate.
- Worker protocol: how PHP talks to the binary.
The project#
- Releasing: how a release reaches GitHub and Composer.
- Architecture decision records: why Fagus is built the way it is.