【问题标题】:JSPDF Auto Table Custom Styles From Class来自类的 JSPDF 自动表格自定义样式
【发布时间】:2019-08-06 07:14:00
【问题描述】:

我有一张像下面这样的表格

<table id="tbl">
    <thead>
    <tr>
        <th>Name</th>
        <th>Amount</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td class="left-align">Name</th>
        <td class="right-align bold">Amount</th>
    </tr>
    </tbody>
</table>

我使用 jspdf 如下代码

doc.autoTable({
    startY:30,
    html: '#tbl',
});

我想根据类格式化行,并在保存 JSPDF 输出时使它们加粗并按其类对齐。

【问题讨论】:

标签: javascript html css jspdf jspdf-autotable


【解决方案1】:

您可以使用useCss 选项来解析一些简单的css 样式,例如字体样式和文本对齐方式。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-09-06
    • 2019-03-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多