html - 单元格中的内容对于 pdf 页面而言太长 (NetSuite)

标签 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>

有什么想法吗?任何帮助将不胜感激。

非常感谢!!

最佳答案

这是在后台使用的 BFO PDF 库的限制。 Google BFO TD issues应该是导致原因的原因。我发现的解决方案是截断文本

关于html - 单元格中的内容对于 pdf 页面而言太长 (NetSuite),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42867060/

相关文章:

html - 另一个 CSS 规则集中的 CSS 规则集

javascript - 低成本页面转换

javascript - 如何在输入标签内添加文本单位(例如厘米)?

html - 更改此 img 正方形并在卡内响应

syntax-error - 无法确定预定Suitescript上评估错误的原因

javascript - 如何将 csv 数据导入 netsuite?

html - Div 不会正确定位。

html - 使用 css 使溢出的文本可读

css - 样式表 - 输入和按钮,CSS

javascript - 使用 SuiteScript 2.0 创建发票时如何传递日期以进行交易