dimanche 9 juillet 2017

Inline css not woking on DomPDF

I was trying to working with DomPDF where i wanted to print some data.But the problem is inline CSS not working on that.Means it can't render the inline CSS though it works perfectly in HTML view How can i make it work..any possible suggestion please?

Here is my blade page to convert PDF

<!DOCTYPE html>
    <html>
    <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
      <title></title>
    </head>
    <body>  
      <div class="main">
        <h3 style="text-align:center"><u>X-Ray Invoice</u></h3>
        <p><strong>Box Number:</strong> </p><br>
        <p style="float:right; margin-top: -38px;margin-right: 230px;"><strong>Custromer ID:</strong> </p><br>
       </div>
    </body>
    </html>

Here is the controller code :

$pdf = PDF::loadView(
                'pdf.test', compact('customer'));
            return $pdf->download('inovice.pdf');

And here is the output

enter image description here



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2tEIGVP
via IFTTT

Aucun commentaire:

Enregistrer un commentaire