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

ericahernandez573's avatar

Dompdf doesnt show currectly view with bootstrap

I have a view with bootstrap style included within

but the col-md doesnt work currectly I embed the bootstrap css into the same html, so non external css but it still dont work

take a look this is the view (blade): http://i.imgur.com/NwIsvfS.png

this is the pdf converted by dompdf: http://i.imgur.com/6wjVgHC.png

how can I fix it?

greetings

0 likes
4 replies
azeame's avatar

I had the same issue before, but I can't remember the project to find the fix, you should try [Bootstrap Printing] (https://blog.donnierayjones.com/2014/10/fix-bootstrap3-printing/) or other similar fixes, but from what I remember it's an issue with the grid system breaking when you are trying to print.

Good luck, and please report back so I can bookmark it this time.

DNABeast's avatar

I just discovered yesterday that Dompdf doesn't load css files. There is a way to do it properly but what I ended up doing was including the css file inline in the html.

<style>
    <?php include(public_path().'/css/print.css');?>
</style>
2 likes

Please or to participate in this conversation.