2014-06-16 77 views
-1

我正在使用HTML創建pdf 我想給樣式輸入類型,但它不起作用。mpdf樣式不適用於輸入類型

我有下面的代碼

$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的造型它不工作

請幫助

+0

使用此[鏈接](http://www.princexml.com/) – Sandy

回答

-1

我有相同的問題,通過MPDF庫 設計頁面,但不幸的mpdf庫不支持所有設計(CSS /標籤) 它支持基本的HTML標籤和ST yling來設計mPDF。

+1

是的mukesh我同意,但應該是一些替代方法設計在mpdf – Deepak

相關問題