php mpdf的css问题,php – 如何在mpdf中添加多个css文件

I am trying to convert my html page into pdf format using mpdf. problem is that i am unable to apply more than one css to pdf

file.. here is my code of php

$html =file_get_contents('mpdf/test.html');

include("../mpdf.php");

$mpdf=new mPDF();

$mpdf->SetDisplayMode('fullpage','two');

// LOAD a stylesheet 1

$stylesheet = file_get_contents('assets/css/main.css');

$mpdf->WriteHTML($stylesheet,1); // The parameter 1 tells that this is css/style only and no body/html/text

// LOAD a stylesheet 2

$stylesheetextra = file_get_contents('assets/css/test.css');

$mpdf->WriteHTML($stylesheetextra ,1); // The parameter 1 tells that this is css/style only and no body/html/text

$mpdf->WriteHTML($html,2);

$mpdf->Output();

exit;

?>

Output it gives doesn’t come with test.css . main.css is applying properly to pdf file but test.css doesn’t applying.please

help me?

thanking you in advance

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值