DEV Community


Posted on • Updated on

Laravel Export PDF from html

Generating PDFs in PHP can be tricky. The main struggle we have faced was making PDFs look exactly the same way as it looked in HTML.

In this tutorial, we will introduce a new library for generating PDFs from HTML.

Snappy is a PHP5 library allowing thumbnail, snapshot or PDF generation from a url or a html page. Under the hood, it is using two popular open source HTML to PDF command line tool. They are wkhtmltopdf and wkhtmltoimage.

Snappy is built with some simple yet very friendly API. We like it because of its simplicity.

It is time to get our hands dirty.

Laravel Export PDF

Top comments (0)