DEV Community

Ellis
Ellis

Posted on • Edited on

2 1

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)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay