Laravel PDF uses Chrome Headless to generate PDFs. This is a great solution for most use cases. You can use any CSS you want, and it will be rendered correctly. However, generating a PDF this way can be resource intensive.
If you don't like the trade-off mentioned above, here are some alternatives to generate PDFs which don't use Chomium under the hood:
-
laravel-dompdf - A DOMPDF Wrapper for Laravel
-
wkhtmltopdf - A command line tool to render HTML into PDF and various image formats using the QT Webkit rendering engine. This is the engine used behind the scenes in Snappy.
-
mPDF - A PHP class to generate PDF files from HTML with Unicode/UTF-8 and CJK support.
-
FPDF - A PHP class for generating PDF files on-the-fly.
These do use Chromium:
-
SnapPDF - Convert webpages or HTML into the PDF file using Chromium-powered browsers.