mpdf样式不适用于输入类型

时间:2014-06-16 12:41:33

标签: html css mpdf

我正在使用HTML创建pdf 我想给输入类型赋予样式但它不起作用。

我有以下代码

$data='<!DOCTYPE html>
<html> 
<head>
    <style>
    .formcontent{margin:0 auto;width:800px;}
    .inputType{border-top:0px;border-bottom:1px solid black;border-left:0px;border-right:0px;width:25%;}
    .custom_para{display:inline;}
    .content{
    margin-top: 4%;
    text-align:justify;
     text-justify:inter-word;
    }
</style>
</head>
<body>
   <div class="formcontent">
   <table width="800px">
    <tr>
   <td>
   <table width="800px">
   <tr>
   <td colspan="3">
   <h1 style="text-align:center;">LEASE</h1>
   <h2 style="text-align:center;"> LEASE LEASE LEASE LEASE</h2></td>
   </tr>
   <tr>
   <td colspan="3">
   <p class="custom_para">This Rental Agreement or Residential Lease shall evidence the complete terms and conditions under which the parties</p>
   <p class="custom_para">whose signatures appear below have agreed. Landlord/Lessor/Agent,<input type="text" class="inputType">,shall be</p>
   <p class="custom_para">referred to as "OWNER" and Tenant(s)/Lessee,<input type="text" class="inputType">,shall be referred to as</p>
   <p class="custom_para">"RESIDENT." As consideration for this agreement, OWNER agrees to rent/lease to RESIDENT and RESIDENT</p>
   <p class="custom_para">agrees to rent/lease from OWNER for use solely as a private residence, the premises located at <input type="text" class="inputType"></p>
   </td>
   </tr>
   </table>
   </td>
   </tr>
   </table>
</div>
</body>
</html>';

require_once('mpdf.php');
$mpdf = new mPDF();
$b=stripslashes($data);
$mpdf->WriteHTML($b);
$mpdf->Output();

我在html输入类型上给它样式它在html页面上工作但是 当我把它放到mpdf来造型它不起作用

请帮助

1 个答案:

答案 0 :(得分:-1)

我在通过MPDF库设计页面时遇到了同样的问题 但不幸的是mpdf库不支持所有设计(css / tags) 它支持基本的html标签和样式来设计mPDF。