我一直在尝试在Tabulator中设置PDF导出的列宽。使用http://tabulator.info/docs/4.5/download#pdf和https://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。
我做错什么了吗?
我正在使用:
谢谢!