0
現在,我已經一切正常。它根據我的CSS打印(text-align:center;)。
我唯一的問題是與圖像。這是HTML代碼:允許<img>標籤內容類型:application/msword
<table id="cert">
<td>
<tr><h1>Singapore Aviation Academy</h1></tr>
<tr><img src = "img/logo1.jpg" /></tr>
<tr><h2>Certificate of Completion </h2></tr>
<tr>is hereby granted to</tr>
<tr><?php echo "<b>".$row['fname']." ".$row['lname']."</b>"; ?> </tr>
<tr>to certify that he/she has completed to satisfaction for</tr>
<tr><?php echo "<b>".$row1['course_title']."</b>"; ?></tr>
</td>
</table>
緊接着說:
<?php
//This php will enable documents to be embedded with Microsoft Word
header("Content-type: application/msword"); //Document will be embedded using the application, Microsoft Word
header("Content-disposition: attachment; filename= \"Certificate for ".$row['fname']." ".$row['lname']."\""); //States the file name when opened to edit or view
?>
的問題是在<img>
標籤。沒有最後一行PHP代碼,圖像就會出現。有了它,圖像就不會顯示在MS-Word中。
任何想法如何解決這個問題?
我畏縮每次TI的圖像的PDF我看到有人嘗試將HTML標記作爲MS Office文檔傳遞給MS Office文檔只需更改標題 – 2011-01-26 10:27:54
標籤與MS Word有什麼關係? – deceze 2011-01-26 10:30:06