i'm using bootstrap-table plugin tableexport plugin (https://github.com/hhurz/tableexport.jquery.plugin).
i managed export table i'd add title in pdf before table itself. here code:
$("#table").bootstraptable({ exportoptions: { filename: 'export_anim', worksheetname: 'table', csvseparator: ';', jspdf: { orientation: "l", autotable: { styles: {rowheight: 14, fontsize: 8, fillcolor: 240}, headerstyles: {fillcolor: 255, textcolor: 0}, alternaterowstyles: {fillcolor: 210, textcolor: 0} } } } });
is there way can ?
one way use beforepagecontent
hook margin
option in autotable. this:
autotable: { margin: {top: 80}, beforepagecontent: function (data) { var doc = data.doc; // internal jspdf instance doc.setfontsize(20); doc.settextcolor(40); doc.setfontstyle('normal'); doc.text("table title", data.settings.margin.left, 60); } }
do note need jspdf-autotable >=2.0.33
. more information check out autotable header , footer demo or code.
Comments
Post a Comment