0
我希望你能幫助我解決這個問題。說實話,我對HTML和CSS的知識是基本的。我擁有的代碼是用PDF打印採購訂單表單。 我的表單看上去很好,直到有人在單元格中有很長的文字。當一個單元格中的內容太大時,我無法讓表格休息到下一頁。它最終看起來像附加的圖像。單元格中的內容太長,不適用於pdf頁面(NetSuite)
page footer with table content over it.
PDF文檔具有0.5的利潤率,但它沒有考慮到這一點無論是。
表如下
<table align="center" class="itemtable" style="border: 0px; border-collapse: collapse; width: 90%; "><!-- start items -->
<#list record.item as item><#if item_index==0> <!-- items table -->
<thead>
<tr> <!-- items table: header row -->
<th align="center">Item</th>
<th align="center" colspan="2">Description</th>
<th align="center">Unit Price</th>
<th align="center">Quantity</th>
<th align="center">Amount</th>
</tr>
</thead></#if>
<tr> <!-- items table: line item row -->
<td>${item.item}</td>
<td colspan="2">${item.description}</td> <!-- this cell can get too long -->
<td align="right">${item.rate}</td>
<td align="right">${item.quantity}</td>
<td align="right">${item.amount}</td>
</tr>
</#list><!-- end items -->
</table>
我有關CSS如下:
<style type="text/css">table {
font-size: 11pt;
table-layout: fixed;
}
td {
padding: 4px 6px;
font-size: 11px;
font-family: arial,helvetica,sans-serif;
}
table.itemtable th {
padding-bottom: 10px;
padding-top: 10px;
}
</style>
任何想法?任何幫助將非常感激。
非常感謝!
感謝您的答案。所以在表單中沒有解決方法,只是告訴用戶寫更簡短的描述? –
是的,如果你不得不使用表格,那麼就沒有辦法解決了。 TD標籤是問題的根源。 – scheppsr77
謝謝你,那太糟糕了。 –