jspdf - 如何在 Tabulator 的 PDF 导出中设置列宽
问题描述
我一直在尝试在 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
}
}
});
但是,似乎 columnStyles 被忽略了,尽管边距有效。
我做错什么了吗?
我在用:
- 制表符 4.5
- jspdf 1.3.5
- jspdf-autotable 3.0.5
谢谢!
解决方案
推荐阅读
- java - 在 Cucumber 胶水选项包中使用多个类
- python - txt 中的分割线。然后附加到两个列表。使列表翻倍
- angular - 当从 Angular 文档下载项目并运行 ng serve -o 项目定义时找不到
- pandas - 将带有日期列的 pyspark DataFrame 转换为 Pandas 会导致 AttributeError
- python - 如何在 Python 中同时录制音频和视频?
- laravel - gcloud app SQLSTATE[HY000] [2002] 连接超时
- html - 网站上有很多视频
- python-3.x - 所有测试用例都通过了,除了一个抛出关键错误的测试用例
- sql - 消息 8156,级别 16,状态 1,第 17 行 为“t”多次指定了“BID_Close”列
- java - 如何在 Java 中动态更改对象的泛型类型?