Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ivymaster's avatar

Dynamic pdf templates,

I need to generate a dynamic pdf template. I created my blade file, and implemented the logic.

I use bootstrap 4 grid. When i try to generate a pdf file using Laravel snappy, it doesnt reckognise my boostrap 4 css at all. Does laravel snappy support bootstrap 4, am I missing something here. Is there any other pdf generator that you recommend over Snappy?

0 likes
7 replies
ivymaster's avatar

Isn't dompdf used for "simpler" pdf generating tasks? That is the reason I went with Snappy. Have you used Dompdf with bootstrap 4?

lemmon's avatar

Yeah you're correct I just use it with tables and vanilla CSS for single page PDF

lemmon's avatar

you can use bootstrap with dompdf just use bootstrap tables

lemmon's avatar

@ivymaster

Isn't dompdf used for "simpler" pdf generating tasks?

I believe that you have to use tables with either one. Correct me if I'm wrong.

ivymaster's avatar

My intention was to use columns because my pdf template consists of sections that are supposed to be sortable, and their width can also change, as well as their alignment. So I wanted to use rows and columns.

Please or to participate in this conversation.