barryvdh / laravel-dompdf

A DOMPDF Wrapper for Laravel
MIT License
6.66k stars 966 forks source link

CSS Doesnot work properly #945

Closed Nutandc closed 1 year ago

Nutandc commented 1 year ago

inline or any internal css doesnot work properly. while loading or generating pdf

programatorseu commented 1 year ago

I have used with 2 projects and work like a charm ! (external, internal, inline) In case of Laravel remember about clearing cache sometimes and compile assets

What css rules does not work?

clwilliams8 commented 1 year ago

I'm also having issues with CSS. I noticed that there is an option in the config file called "enable_html5_parser" which is set to true by default. Do PDF's not support CSS3 ? Things like display flex and so on? I'm very new to writing html and css to generate a PDF file. It seems like a lot of CSS rules don't work. Any advice would be very much appreciated

Nutandc commented 1 year ago

@programatorseu @clwilliams8 css like

    display: flex;
    align-items: center;
    justify-content: center;
    display: inline-flex;

Doesnot supports. later on i converted them to table form. it would be great if it supports all css that can be rendered by browsers.