Problems of css styles in DOMPDF Laravel 5.7

0

I have a query about this library DOMPDF Laravel to generate pdf documents, it turns out that through this I am generating a receipt as invoice to the client, which I have no problems to create it, my problem lies when I want to give styles to this blade because it creates its own css and bootstrap styles but it does not read any style, however if this page with the same format took it to a normal index it works grabs all the styles that I created, no I know if I'm missing something or something has to be mentioned so that when I pass it to pdf I'll get the CSS styles: I add the images so that it can be understood.

    
asked by Jonathan Barrero 03.11.2018 в 02:12
source

1 answer

-2

You have to put all your css code in the head, otherwise it would not work.

In particular I use this library very often, and it does not work with external files. So what I do is use% native% co within the layout that I'm going to use, example within the css tag:

<style>
    .master
    {
        width: 100%;
        margin: 0px auto;
    }

    th
    {
        text-align: center;
        vertical-align: middle;
        border: 1px solid #006ac1;
        background-color: #00AEEF;
        color: #ffffff;
    }    
</style>

If you can tell me classes and others work, try this example.

    
answered by 03.11.2018 в 19:20