我使用yii
扩展程序将html转换为pdf,这是我正在使用的HTML代码。
<table cellpadding="0" cellspacing="0" style="width:100%;">
<tr>
<td>
<table cellpadding="0" cellspacing="0" style="width:100%;">
<tr>
<td style="text-align:center; width:100%; padding:35px 0 15px 0;"><img src="<?php echo Yii::app()->baseUrl;?>/images/digest_logo.png" /></td>
</tr>
<tr>
<td style="text-align:center; color:#2d2d2d;">April 18, 2016</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="padding-top:20px;">
<table cellpadding="0" cellspacing="0" style="width:100%; background:#f3f3f1;">
<tr>
<td style="width:100%; padding:40px 75px 35px;">
<h1 style="margin:0 0 35px 0; font-weight:normal; font-size:24px;">Hi, Patron</h1>
<p style="margin:0 0 4px 0; font-size:17px;">Greetings from Crownit,</p>
<p style="margin:0 0 4px 0; font-size:17px;">Crown it believes ut is very important to. make</p>
<p style="margin:0 0 4px 0; font-size:17px;">Lorem ipsum Lorem ipsumhhhhhhhhh hhhhhn </p>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td style="background-image:url(<?php echo Yii::app()->baseUrl;?>/images/bg-script.png)">
sdf
</td>
</tr>
</table>
突然间,我陷入了一个我想使用background-image
的地方,因为我的设计是这样的
当我在pdf中看到结果时出现此错误
无法加载图片C:/xampp/htdocs//var/www/html/insight/insight/images/bg-script.png
我不确定为什么这个背景css在pdf中不起作用,它在浏览器中工作正常。
任何帮助表示赞赏!
答案 0 :(得分:0)
得到了答案。
此pdf扩展程序支持的CSS很少。
目前,仅支持以下CSS属性:
其他标签不起作用。