单元格中的内容对于pdf页面来说太长了(NetSuite)

时间:2017-03-17 21:03:26

标签: html css netsuite

我希望你能帮我解决这个疑问。说实话,我对HTML和CSS的了解是基本的。我的代码是用PDF打印采购订单表格。 我的表单外观和工作完全正常,直到有人在单元格中有一个非常长的文本。当一个单元格中的内容太大时,我无法让表格中断到下一页。它最终看起来像附加的图像。

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>

有什么想法吗?任何帮助将非常感谢。

非常感谢!!

1 个答案:

答案 0 :(得分:0)

这是在幕后使用的BFO PDF库的限制。谷歌BFO TD问题应该导致原因。我发现的解决方案是截断文本