Adailton de Jesus Cerqueira Junior's avatar

Which library do you indicate for create PDF in laravel?

Hi,

Currently, we are using barryvdh/laravel-dompdf for create PDF's file in our system. However, we are searching a new modern alternative package.

We found spatie/laravel-pdf library, but we yet not test it.

So, we would like which library the community recommends.

Best Regards.

0 likes
4 replies
Jsanwo64's avatar

"barryvdh/laravel-dompdf for sure. Spatie can come with issues involving chromium

Some developers have experienced issues with the Spatie approach due to the browser dependency. But that doesn’t mean it’s bad, just operationally more complex.

Choose barryvdh/laravel-dompdf if:

  1. You want reliable, simple setup.

  2. Your PDFs don’t need advanced CSS/features.

Choose spatie/laravel-pdf if:

  1. You need accurate browser-quality rendering.

  2. You can manage server requirements (Chromium).

Thomas123's avatar

Spatie/laravel-pdf stands out as the modern community-recommended alternative to barryvdh/laravel-dompdf for PDF generation in Laravel.

Snapey's avatar

I got fed up with deployment issues with browsershot type solutions, so switched to an api from https://www.neutrinoapi.com/

Their HTML render service does it quickly and easily and has been 100% reliable

1 like
hinlocaesar-75309181's avatar
  1. Snappy (Laravel Snappy) — based on wkhtmltopdf ✔ Renders PDFs from HTML/CSS using a real browser engine (WebKit) ✔ Better CSS support than DOMPDF (especially layouts, floats, positioning) ✔ Good for complex designs 📦 Package: barryvdh/laravel-snappy

Please or to participate in this conversation.