如何在Tabulator的PDF导出中设置列宽

时间:2020-08-07 14:58:55

标签: jspdf tabulator jspdf-autotable

我一直在尝试在Tabulator中设置PDF导出的列宽。使用http://tabulator.info/docs/4.5/download#pdfhttps://github.com/simonbengtsson/jsPDF-AutoTable#styling-options作为参考,我编写了这段代码:

table.download("pdf", "data.pdf", {
    "orientation":"portrait",

    "autoTable":{
        "columnStyles": {
            "allocated_site_name": {"cellWidth": 20}
        },
        margin: {
            "top": 40,
            "right": 20,
            "bottom": 20,
            "left": 20
        }
    }
});

但是,尽管margin有效,但似乎好像忽略了columnStyles。

我做错什么了吗?

我正在使用:

  • Tabulator 4.5
  • jspdf 1.3.5
  • jspdf-autotable 3.0.5

谢谢!

0 个答案:

没有答案
相关问题