我需要在jspdf.debug.js中更改默认的pdf页面宽度和字体大小.
在哪里以及如何更改jspdf.debug.js中的默认值?
我可以使用下面的脚本从html表生成PDF文件:但我得到的所有列数据都是逐行的.
请帮助我以表格格式化方式生成PDF文件.(在此脚本中使用列边框,边距或填充,标题)
我使用jsPDF lib脚本生成一个HTML表格.
var pdf = new jsPDF('p', 'pt', 'letter')
, source = $('#TableId')[0]
, specialElementHandlers = {
// element with id of "bypass" - jQuery style selector
'#bypassme': function(element, renderer){
return true
}
}
, margins = {
top: 20,
bottom: 20,
left: 30,
width: 922
};
pdf.fromHTML(
source // HTML string or DOM elem ref.
, margins.left // x coord
, margins.top // y coord
, {
'width': margins.width // max width of content on PDF
, …
Run Code Online (Sandbox Code Playgroud) 我在最近两天受到了打击,设置了使用jsPDF生成PDF的列宽.
我能够使用来自html表的jsPDF lib生成pdf,但是我遇到了重叠列的问题.因为我想在工作表中显示20列.我已将选项纵向更改为横向,并在导出脚本选项以及html表格宽度时设置宽度5000.
请帮助我,从jsPDF设置pdf列宽.谢谢