dsgw8802 2017-07-10 04:29
浏览 205

内联css不适用于DomPDF

I am 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> {{$customer->box_number}}</p><br>
        <p style="float:right; margin-top: -38px;margin-right: 230px;"><strong>Custromer ID:</strong> {{$customer->uniqueId}}</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

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
    • ¥30 自适应 LMS 算法实现 FIR 最佳维纳滤波器matlab方案
    • ¥15 lingo18勾选global solver求解使用的算法
    • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
    • ¥15 Python3.5 相关代码写作
    • ¥20 测距传感器数据手册i2c
    • ¥15 RPA正常跑,cmd输入cookies跑不出来
    • ¥15 求帮我调试一下freefem代码
    • ¥15 matlab代码解决,怎么运行
    • ¥15 R语言Rstudio突然无法启动