---
title: "Fagus documentation: HTML and CSS to PDF for PHP"
description: "Fagus turns HTML and CSS into PDF for PHP and Laravel, the way Chrome prints them, without a browser. Getting started, references and the PDF it writes."
canonical_url: "https://fagus.niklasforst.de/docs"
meta:
  "og:description": "Fagus turns HTML and CSS into PDF for PHP and Laravel, the way Chrome prints them, without a browser. Getting started, references and the PDF it writes."
  "og:image": "https://fagus.niklasforst.de/og.jpg"
  "og:image:alt": "Fagus: HTML and CSS to PDF for PHP and Laravel, without a browser"
  "og:image:height": "630"
  "og:image:width": "1200"
  "og:title": "Fagus documentation: HTML and CSS to PDF for PHP"
---

> Index of every page on this site: [llms.txt](https://fagus.niklasforst.de/llms.txt)

# 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](https://fagus.niklasforst.de/docs/getting-started); the other pages are references to look things up in.

## Using Fagus \#

- [Getting started](https://fagus.niklasforst.de/docs/getting-started): requirements, installing the Composer package, the first PDF in PHP and in Laravel.
- [PHP API](https://fagus.niklasforst.de/docs/php): documents, the PDF they render to, the engine, diagnostics and exceptions.
- [Laravel](https://fagus.niklasforst.de/docs/laravel): the facade, Blade views, responses, disks, queues, Octane and the configuration.
- [Resources](https://fagus.niklasforst.de/docs/resources): where images, style sheets, fonts and frames come from, and what Fagus never loads.
- [Deployment](https://fagus.niklasforst.de/docs/deployment): Docker, Alpine, servers without access to GitHub, binaries of your own, worker processes, speed and memory.
- [Troubleshooting](https://fagus.niklasforst.de/docs/troubleshooting): error messages, diagnostics, differences from Chrome, and moving from Dompdf, mPDF, Browsershot or Snappy.

## Writing documents \#

- [CSS reference](https://fagus.niklasforst.de/docs/css): what Fagus supports, what it does differently from Chrome and what it does not support.
- [Paged media](https://fagus.niklasforst.de/docs/paged-media): page sizes and margins, headers and footers, page numbers, page breaks, tables across pages, tables of contents, print shop marks.
- [Fonts](https://fagus.niklasforst.de/docs/fonts): the built-in font, font directories, `@font-face`, system fonts, fallback, OpenType features and languages.
- [Extensions](https://fagus.niklasforst.de/docs/extensions): what Fagus adds where CSS has no way, such as carry-over rows in tables that break across pages.

## The PDF \#

- [The PDF](https://fagus.niklasforst.de/docs/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](https://fagus.niklasforst.de/docs/cli): the `fagus` binary.
- [Rust library](https://fagus.niklasforst.de/docs/rust): the engine as a Rust crate.
- [Worker protocol](https://fagus.niklasforst.de/docs/protocol): how PHP talks to the binary.

## The project \#

- [Releasing](https://fagus.niklasforst.de/docs/releasing): how a release reaches GitHub and Composer.
- [Architecture decision records](https://github.com/nforst/fagus/tree/v0.1.0/docs/adr): why Fagus is built the way it is.

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://fagus.niklasforst.de/#website","@type":"WebSite","description":"HTML and CSS to PDF for PHP and Laravel, without a browser.","name":"Fagus","url":"https://fagus.niklasforst.de/","publisher":{"@id":"https://fagus.niklasforst.de/#identity"}},{"@id":"https://fagus.niklasforst.de/docs#webpage","@type":"WebPage","description":"Fagus turns HTML and CSS into PDF for PHP and Laravel, the way Chrome prints them, without a browser. Getting started, references and the PDF it writes.","name":"Fagus documentation: HTML and CSS to PDF for PHP","url":"https://fagus.niklasforst.de/docs","isPartOf":{"@id":"https://fagus.niklasforst.de/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://fagus.niklasforst.de/docs"]}]},{"@id":"https://fagus.niklasforst.de/#identity","@type":"Person","name":"Niklas Forst","url":"https://niklasforst.de","sameAs":["https://github.com/nforst"]}]}
```