From c767badd588ae3d4f9d5c2384788b899dba0518a Mon Sep 17 00:00:00 2001 From: hhurz Date: Sun, 7 Apr 2024 20:42:55 +0200 Subject: [PATCH] The PDF export with pdfmake now also takes into account some style attributes from the html table to be exported: alignment, background color, color, font style --- tableExport.js | 43 ++++++---- tableExport.min.js | 196 +++++++++++++++++++++++---------------------- test/pdfmake.html | 29 ++++++- 3 files changed, 154 insertions(+), 114 deletions(-) diff --git a/tableExport.js b/tableExport.js index 77a4caa..30186e0 100644 --- a/tableExport.js +++ b/tableExport.js @@ -1,7 +1,7 @@ /** * @preserve tableExport.jquery.plugin * - * Version 1.29.0 + * Version 1.30.0 * * Copyright (c) 2015-2024 hhurz, * https://github.com/hhurz/tableExport.jquery.plugin @@ -1043,14 +1043,29 @@ let cellContent; if (typeof cell !== 'undefined' && cell !== null) { - const colspan = getColspan(cell); - const rowspan = getRowspan(cell); - - cellContent = {text: parseString(cell, row, col) || ' '}; - - if (colspan > 1 || rowspan > 1) { - cellContent['colSpan'] = colspan || 1; - cellContent['rowSpan'] = rowspan || 1; + const cs = getCellStyles(cell); + const clamp = (val) => Math.min(255, Math.max(0, val)); + const toHex = (val) => { + const hex = clamp(val).toString(16); + return hex.length === 1 ? '0' + hex : hex; + }; + + cellContent = { + text: parseString(cell, row, col) || ' ', + alignment: cs.style.align, + backgroundColor: '#' + toHex(cs.style.bcolor[0]) + toHex(cs.style.bcolor[1]) + toHex(cs.style.bcolor[2]), + color: '#' + toHex(cs.style.color[0]) + toHex(cs.style.color[1]) + toHex(cs.style.color[2]) + }; + + if (cs.style.fstyle.includes('italic')) + cellContent['fontStyle'] = 'italic'; + + if (cs.style.fstyle.includes('bold')) + cellContent['bold'] = true; + + if (cs.colspan > 1 || cs.rowspan > 1) { + cellContent['colSpan'] = cs.colspan || 1; + cellContent['rowSpan'] = cs.rowspan || 1; } } else cellContent = {text: ' '}; @@ -1074,17 +1089,13 @@ }; $head_rows = collectHeadRows($table); - - let colcount = CollectPdfmakeData($head_rows, 'th,td', $head_rows.length); - - for (let i = widths.length; i < colcount; i++) - widths.push(colWidth); + let head_colcount = CollectPdfmakeData($head_rows, 'th,td', $head_rows.length); // Data $rows = collectRows($table); + let body_colcount = CollectPdfmakeData($rows, 'td', $head_rows.length + $rows.length); - colcount = CollectPdfmakeData($rows, 'td', $head_rows.length + $rows.length); - + let colcount = head_colcount > body_colcount ? head_colcount : body_colcount; for (let i = widths.length; i < colcount; i++) widths.push(colWidth); diff --git a/tableExport.min.js b/tableExport.min.js index 92ef6b8..d6fb4b9 100644 --- a/tableExport.min.js +++ b/tableExport.min.js @@ -1,7 +1,7 @@ /* tableExport.jquery.plugin - Version 1.29.0 + Version 1.30.0 Copyright (c) 2015-2024 hhurz, https://github.com/hhurz/tableExport.jquery.plugin @@ -10,107 +10,109 @@ Licensed under the MIT License */ -var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.findInternal=function(d,I,w){d instanceof String&&(d=String(d));for(var J=d.length,K=0;Ke&&"undefined"!==typeof fa[e]&&-1!==d.inArray(fa[e],b.ignoreColumn))&&(g=!0):g=!0;return g}function G(a,c,e,g,f){if("function"===typeof f){var x=!1;"function"===typeof b.onIgnoreRow&&(x=b.onIgnoreRow(d(a),e));if(!1===x&&(0===b.ignoreRow.length||-1===d.inArray(e,b.ignoreRow)&&-1===d.inArray(e-g,b.ignoreRow))&&O(d(a))){a= -P(d(a),c);var l=a.length,h=0,p=0;a.each(function(){var a=d(this),c=Q(this),b=ha(this),g;d.each(N,function(){if(e>this.s.r&&e<=this.e.r&&h>=this.s.c&&h<=this.e.c)for(g=0;g<=this.e.c-this.s.c;++g)l++,p++,f(null,e,h++)});if(b||c)c=c||1,N.push({s:{r:e,c:h},e:{r:e+(b||1)-1,c:h+c-1}});!1===Wa(a,l,p++)&&f(this,e,h++);if(1=this.s.r&&e<=this.e.r&&h>=this.s.c&&h<=this.e.c)for(var a=0;a<=this.e.c-this.s.c;++a)f(null,e,h++)})}}}function Xa(a,c, -b,g){if("undefined"!==typeof g.images&&(b=g.images[b],"undefined"!==typeof b)){c=c.getBoundingClientRect();var e=a.width/a.height,d=c.width/c.height,l=a.width,h=a.height,p=19.049976/25.4,B=0;d<=e?(h=Math.min(a.height,c.height),l=c.width*h/c.height):d>e&&(l=Math.min(a.width,c.width),h=c.height*l/c.width);l*=p;h*=p;ha.textPos.x&&g+B>a.textPos.x+a.width&&(0<=".,!%*;:=-".indexOf(p.charAt(0))&&(z=p.charAt(0),B=e.doc.getStringUnitWidth(z)*e.doc.internal.getFontSize(),g+B<=a.textPos.x+a.width&&(za(z,g,f,x),p=p.substring(1,p.length)),B=e.doc.getStringUnitWidth(p)*e.doc.internal.getFontSize()),g=a.textPos.x,f+=e.doc.internal.getFontSize()); -if("visible"!==a.styles.overflow)for(;p.length&&g+B>a.textPos.x+a.width;)p=p.substring(0,p.length-1),B=e.doc.getStringUnitWidth(p)*e.doc.internal.getFontSize();za(p,g,f,x);g+=B}if(l||h)d(c).is("b")?l=!1:d(c).is("i")&&(h=!1),e.doc.setFont("undefined ",l||h?l?"bold":"italic":"normal");c=c.nextSibling}a.textPos.x=g;a.textPos.y=f}else za(a.text,a.textPos.x,a.textPos.y,x)}}function la(a,c,b){return null==a?"":a.toString().replace(new RegExp(null==c?"":c.toString().replace(/([.*+?^=!:${}()|\[\]\/\\])/g, -"\\$1"),"g"),b)}function Ia(a){return null==a?"":a.toString().replace(/^\s+/,"")}function Ja(a){return null==a?"":a.toString().replace(/\s+$/,"")}function pb(a){if(0===b.date.html.length)return!1;b.date.pattern.lastIndex=0;var c=b.date.pattern.exec(a);if(null==c)return!1;a=+c[b.date.match_y];if(0>a||8099"+h+"",null,!1);var p=0,B=0;h="";d.each(a,function(){if(d(this).is("input"))h+=l.find("input").eq(p++).val();else if(d(this).is("select"))h+=l.find("select option:selected").eq(B++).text();else if(d(this).is("br"))h+="
";else{if("undefined"===typeof d(this).html())h+=d(this).text(); -else if(void 0===jQuery().bootstrapTable||!1===d(this).hasClass("fht-cell")&&!1===d(this).hasClass("filterControl")&&0===l.parents(".detail-view").length)h+=d(this).html();if(d(this).is("a")){var a=l.find("a").attr("href")||"";f="function"===typeof b.onCellHtmlHyperlink?f+b.onCellHtmlHyperlink(l,c,e,a,h):"href"===b.htmlHyperlink?f+a:f+h;h=""}}})}if(h&&""!==h&&!0===b.htmlContent)f=d.trim(h);else if(h&&""!==h)if(""!==l.attr("data-tableexport-cellformat")){var z=h.replace(/\n/g,"\u2028").replace(/(<\s*br([^>]*)>)/gi, -"\u2060"),k=d("
").html(z).contents();a=!1;z="";d.each(k.text().split("\u2028"),function(a,c){0a?1:0)).split(".");1===k.length&&(k[1]="");var Ga=3a?"-":"")+(b.numbers.output.thousandsSeparator?(Ga?k[0].substr(0,Ga)+b.numbers.output.thousandsSeparator:"")+k[0].substr(Ga).replace(/(\d{3})(?=\d)/g,"$1"+b.numbers.output.thousandsSeparator):k[0])+(k[1].length?b.numbers.output.decimalMark+ -k[1]:"")}}else f=h;!0===b.escape&&(f=escape(f));"function"===typeof b.onCellData&&(f=b.onCellData(l,c,e,f,x),l.data("teUserDefText",1))}void 0!==g&&(g.type=x);return f}function eb(a){return 0x?f+=String.fromCharCode(x):(127x?f+=String.fromCharCode(x>>6|192):(f+=String.fromCharCode(x>>12|224),f+=String.fromCharCode(x>>6&63|128)),f+=String.fromCharCode(x&63|128))}a=f}for(;d>2;l=(l&3)<<4|f>>4;var h=(f&15)<<2|c>>6;var p=c&63;isNaN(f)?h=p=64:isNaN(c)&&(p=64);b=b+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(x)+ -"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(l)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p)}return b}function tb(a,c,b,d){c&&"object"===typeof c||console.error("The headers should be an object or array, is: "+typeof c);b&&"object"===typeof b||console.error("The data should be an object or array, is: "+typeof b);d&&"object"!==typeof d&&console.error("The data should be an object or array, is: "+ -typeof b);Array.prototype.forEach||console.error("The current browser does not support Array.prototype.forEach which is required for jsPDF-AutoTable");y=a;m=ub(d||{});Na=1;F={y:!1===m.startY?m.margin.top:m.startY};a={textColor:30,fontSize:y.internal.getFontSize(),fontStyle:y.internal.getFont().fontStyle,fontName:y.internal.getFont().fontName};vb(c,b);wb();c=m.startY+m.margin.bottom+q.headerRow.height+(q.rows[0]&&"auto"===m.pageBreak?q.rows[0].height:0);"avoid"===m.pageBreak&&(c+=q.height);if("always"=== -m.pageBreak&&!1!==m.startY||!1!==m.startY&&c>y.internal.pageSize.height)y.addPage(),F.y=m.margin.top;ma(a);m.beforePageContent(U());!1!==m.drawHeaderRow(q.headerRow,U({row:q.headerRow}))&&Oa(q.headerRow,m.drawHeaderCell);ma(a);xb();m.afterPageContent(U());ma(a);return y}function za(a,c,b,d){"number"===typeof c&&"number"===typeof b||console.error("The x and y parameters are required. Missing for the text: ",a);var e=y.internal.getFontSize()/y.internal.scaleFactor,g=/\r\n|\r|\n/g,l=null,h=1;if("middle"=== -d.valign||"bottom"===d.valign||"center"===d.halign||"right"===d.halign)l="string"===typeof a?a.split(g):a,h=l.length||1;b+=e*(2-1.15);"middle"===d.valign?b-=h/2*e:"bottom"===d.valign&&(b-=h*e);if("center"===d.halign||"right"===d.halign){g=e;"center"===d.halign&&(g*=.5);if(l&&1<=h){for(a=0;ae&&"undefined"!==typeof fa[e]&&-1!==d.inArray(fa[e],b.ignoreColumn))&&(h=!0):h=!0;return h}function I(a,c,e,h,f){if("function"===typeof f){var w=!1;"function"===typeof b.onIgnoreRow&&(w=b.onIgnoreRow(d(a),e));if(!1===w&&(0===b.ignoreRow.length||-1===d.inArray(e,b.ignoreRow)&&-1===d.inArray(e-h,b.ignoreRow))&&O(d(a))){a= +P(d(a),c);var m=a.length,g=0,p=0;a.each(function(){var a=d(this),c=Y(this),b=ka(this),h;d.each(N,function(){if(e>this.s.r&&e<=this.e.r&&g>=this.s.c&&g<=this.e.c)for(h=0;h<=this.e.c-this.s.c;++h)m++,p++,f(null,e,g++)});if(b||c)c=c||1,N.push({s:{r:e,c:g},e:{r:e+(b||1)-1,c:g+c-1}});!1===Wa(a,m,p++)&&f(this,e,g++);if(1=this.s.r&&e<=this.e.r&&g>=this.s.c&&g<=this.e.c)for(var a=0;a<=this.e.c-this.s.c;++a)f(null,e,g++)})}}}function Xa(a,c, +b,h){if("undefined"!==typeof h.images&&(b=h.images[b],"undefined"!==typeof b)){c=c.getBoundingClientRect();var e=a.width/a.height,d=c.width/c.height,m=a.width,g=a.height,p=19.049976/25.4,B=0;d<=e?(g=Math.min(a.height,c.height),m=c.width*g/c.height):d>e&&(m=Math.min(a.width,c.width),g=c.height*m/c.width);m*=p;g*=p;ga.textPos.x&&h+B>a.textPos.x+a.width&&(0<=".,!%*;:=-".indexOf(p.charAt(0))&&(A=p.charAt(0),B=e.doc.getStringUnitWidth(A)*e.doc.internal.getFontSize(),h+B<=a.textPos.x+a.width&&(za(A,h,f,w),p=p.substring(1,p.length)),B=e.doc.getStringUnitWidth(p)*e.doc.internal.getFontSize()),h=a.textPos.x,f+=e.doc.internal.getFontSize()); +if("visible"!==a.styles.overflow)for(;p.length&&h+B>a.textPos.x+a.width;)p=p.substring(0,p.length-1),B=e.doc.getStringUnitWidth(p)*e.doc.internal.getFontSize();za(p,h,f,w);h+=B}if(m||g)d(c).is("b")?m=!1:d(c).is("i")&&(g=!1),e.doc.setFont("undefined ",m||g?m?"bold":"italic":"normal");c=c.nextSibling}a.textPos.x=h;a.textPos.y=f}else za(a.text,a.textPos.x,a.textPos.y,w)}}function la(a,c,b){return null==a?"":a.toString().replace(new RegExp(null==c?"":c.toString().replace(/([.*+?^=!:${}()|\[\]\/\\])/g, +"\\$1"),"g"),b)}function Ha(a){return null==a?"":a.toString().replace(/^\s+/,"")}function Ia(a){return null==a?"":a.toString().replace(/\s+$/,"")}function ob(a){if(0===b.date.html.length)return!1;b.date.pattern.lastIndex=0;var c=b.date.pattern.exec(a);if(null==c)return!1;a=+c[b.date.match_y];if(0>a||8099"+g+"
",null,!1);var p=0,B=0;g="";d.each(a,function(){if(d(this).is("input"))g+=m.find("input").eq(p++).val();else if(d(this).is("select"))g+=m.find("select option:selected").eq(B++).text();else if(d(this).is("br"))g+="
";else{if("undefined"===typeof d(this).html())g+=d(this).text(); +else if(void 0===jQuery().bootstrapTable||!1===d(this).hasClass("fht-cell")&&!1===d(this).hasClass("filterControl")&&0===m.parents(".detail-view").length)g+=d(this).html();if(d(this).is("a")){var a=m.find("a").attr("href")||"";f="function"===typeof b.onCellHtmlHyperlink?f+b.onCellHtmlHyperlink(m,c,e,a,g):"href"===b.htmlHyperlink?f+a:f+g;g=""}}})}if(g&&""!==g&&!0===b.htmlContent)f=d.trim(g);else if(g&&""!==g)if(""!==m.attr("data-tableexport-cellformat")){var A=g.replace(/\n/g,"\u2028").replace(/(<\s*br([^>]*)>)/gi, +"\u2060"),k=d("
").html(A).contents();a=!1;A="";d.each(k.text().split("\u2028"),function(a,c){0a?1:0)).split(".");1===k.length&&(k[1]="");var l=3a?"-":"")+(b.numbers.output.thousandsSeparator?(l?k[0].substr(0,l)+b.numbers.output.thousandsSeparator:"")+k[0].substr(l).replace(/(\d{3})(?=\d)/g,"$1"+b.numbers.output.thousandsSeparator):k[0])+(k[1].length?b.numbers.output.decimalMark+ +k[1]:"")}}else f=g;!0===b.escape&&(f=escape(f));"function"===typeof b.onCellData&&(f=b.onCellData(m,c,e,f,w),m.data("teUserDefText",1))}void 0!==h&&(h.type=w);return f}function eb(a){return 0w?f+=String.fromCharCode(w):(127w?f+=String.fromCharCode(w>>6|192):(f+=String.fromCharCode(w>>12|224),f+=String.fromCharCode(w>>6&63|128)),f+=String.fromCharCode(w&63|128))}a=f}for(;d>2;m=(m&3)<<4|f>>4;var g=(f&15)<<2|c>>6;var p=c&63;isNaN(f)?g=p=64:isNaN(c)&&(p=64);b=b+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(w)+ +"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(m)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(g)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(p)}return b}function sb(a,c,b,d){c&&"object"===typeof c||console.error("The headers should be an object or array, is: "+typeof c);b&&"object"===typeof b||console.error("The data should be an object or array, is: "+typeof b);d&&"object"!==typeof d&&console.error("The data should be an object or array, is: "+ +typeof b);Array.prototype.forEach||console.error("The current browser does not support Array.prototype.forEach which is required for jsPDF-AutoTable");x=a;l=tb(d||{});Na=1;H={y:!1===l.startY?l.margin.top:l.startY};a={textColor:30,fontSize:x.internal.getFontSize(),fontStyle:x.internal.getFont().fontStyle,fontName:x.internal.getFont().fontName};ub(c,b);vb();c=l.startY+l.margin.bottom+q.headerRow.height+(q.rows[0]&&"auto"===l.pageBreak?q.rows[0].height:0);"avoid"===l.pageBreak&&(c+=q.height);if("always"=== +l.pageBreak&&!1!==l.startY||!1!==l.startY&&c>x.internal.pageSize.height)x.addPage(),H.y=l.margin.top;ma(a);l.beforePageContent(T());!1!==l.drawHeaderRow(q.headerRow,T({row:q.headerRow}))&&Oa(q.headerRow,l.drawHeaderCell);ma(a);wb();l.afterPageContent(T());ma(a);return x}function za(a,c,b,d){"number"===typeof c&&"number"===typeof b||console.error("The x and y parameters are required. Missing for the text: ",a);var e=x.internal.getFontSize()/x.internal.scaleFactor,h=/\r\n|\r|\n/g,m=null,g=1;if("middle"=== +d.valign||"bottom"===d.valign||"center"===d.halign||"right"===d.halign)m="string"===typeof a?a.split(h):a,g=m.length||1;b+=e*(2-1.15);"middle"===d.valign?b-=g/2*e:"bottom"===d.valign&&(b-=g*e);if("center"===d.halign||"right"===d.halign){h=e;"center"===d.halign&&(h*=.5);if(m&&1<=g){for(a=0;ab.contentWidth&&(b.contentWidth=a)});b.width=b.contentWidth;a+=b.contentWidth});q.contentWidth=a;var b=y.internal.pageSize.width-m.margin.left-m.margin.right,d=b;"number"===typeof m.tableWidth?d=m.tableWidth:"wrap"===m.tableWidth&&(d=q.contentWidth);q.width=dq.width?a.width=a.contentWidth:(g.push(a),f+=a.contentWidth,a.width=0);l+=a.width});ib(g,l,f,k);q.height=0;q.rows.concat(q.headerRow).forEach(function(a,b){var c=0,d=q.x;q.columns.forEach(function(b){var e=a.cells[b.dataKey];b.x=d;ma(e.styles);var f=b.width- -2*e.styles.cellPadding;"linebreak"===e.styles.overflow?e.text=y.splitTextToSize(e.text,f+1,{fontSize:e.styles.fontSize}):"ellipsize"===e.styles.overflow?e.text=Pa(e.text,f,e.styles):"visible"!==e.styles.overflow&&("hidden"===e.styles.overflow?e.text=Pa(e.text,f,e.styles,""):"function"===typeof e.styles.overflow?e.text=e.styles.overflow(e.text,f):console.error("Unrecognized overflow type: "+e.styles.overflow));e=Array.isArray(e.text)?e.text.length-1:0;e>c&&(c=e);d+=b.width});a.heightStyle=a.styles.rowHeight; -a.height=a.heightStyle+c*a.styles.fontSize*1.15+(2-1.15)/2*a.styles.fontSize;q.height+=a.height})}function ib(a,b,e,d){for(var c=q.width-b-e,g=0;gc&&p){a.splice(g,1);e-=l.contentWidth;l.width=d;b+=l.width;ib(a,b,e,d);break}else l.width=l.contentWidth+c*h}}function xb(){q.rows.forEach(function(a,b){F.y+a.height+m.margin.bottom>=y.internal.pageSize.height&&(m.afterPageContent(U()),y.addPage(),Na++,F={x:m.margin.left,y:m.margin.top}, -m.beforePageContent(U()),!1!==m.drawHeaderRow(q.headerRow,U({row:q.headerRow}))&&Oa(q.headerRow,m.drawHeaderCell));a.y=F.y;!1!==m.drawRow(a,U({row:a}))&&Oa(a,m.drawCell)})}function Oa(a,b){for(var c=0;c= -Ca(a,d))return a;for(;ba.length);)a=a.substring(0,a.length-1);return a.trim()+g}function Ca(a,b){ma(b);return y.getStringUnitWidth(a)*b.fontSize}function Z(a){var b={},d;for(d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);for(var g=1;gb.contentWidth&&(b.contentWidth=a)});b.width=b.contentWidth;a+=b.contentWidth});q.contentWidth=a;var b=x.internal.pageSize.width-l.margin.left-l.margin.right,d=b;"number"===typeof l.tableWidth?d=l.tableWidth:"wrap"===l.tableWidth&&(d=q.contentWidth);q.width=dq.width?a.width=a.contentWidth:(h.push(a),f+=a.contentWidth,a.width=0);m+=a.width});hb(h,m,f,k);q.height=0;q.rows.concat(q.headerRow).forEach(function(a,b){var c=0,d=q.x;q.columns.forEach(function(b){var e=a.cells[b.dataKey];b.x=d;ma(e.styles);var g=b.width- +2*e.styles.cellPadding;"linebreak"===e.styles.overflow?e.text=x.splitTextToSize(e.text,g+1,{fontSize:e.styles.fontSize}):"ellipsize"===e.styles.overflow?e.text=Pa(e.text,g,e.styles):"visible"!==e.styles.overflow&&("hidden"===e.styles.overflow?e.text=Pa(e.text,g,e.styles,""):"function"===typeof e.styles.overflow?e.text=e.styles.overflow(e.text,g):console.error("Unrecognized overflow type: "+e.styles.overflow));e=Array.isArray(e.text)?e.text.length-1:0;e>c&&(c=e);d+=b.width});a.heightStyle=a.styles.rowHeight; +a.height=a.heightStyle+c*a.styles.fontSize*1.15+(2-1.15)/2*a.styles.fontSize;q.height+=a.height})}function hb(a,b,d,h){for(var c=q.width-b-d,e=0;ec&&p){a.splice(e,1);d-=m.contentWidth;m.width=h;b+=m.width;hb(a,b,d,h);break}else m.width=m.contentWidth+c*g}}function wb(){q.rows.forEach(function(a,b){H.y+a.height+l.margin.bottom>=x.internal.pageSize.height&&(l.afterPageContent(T()),x.addPage(),Na++,H={x:l.margin.left,y:l.margin.top}, +l.beforePageContent(T()),!1!==l.drawHeaderRow(q.headerRow,T({row:q.headerRow}))&&Oa(q.headerRow,l.drawHeaderCell));a.y=H.y;!1!==l.drawRow(a,T({row:a}))&&Oa(a,l.drawCell)})}function Oa(a,b){for(var c=0;c= +Ca(a,d))return a;for(;ba.length);)a=a.substring(0,a.length-1);return a.trim()+h}function Ca(a,b){ma(b);return x.getStringUnitWidth(a)*b.fontSize}function Z(a){var b={},d;for(d in a)a.hasOwnProperty(d)&&(b[d]=a[d]);for(var h=1;h"+E(a,b,d)+""});r++});da+="";var jb=1;A=Y(d(u));d(A).each(function(){var a=1;t="";G(this,"td,th",r,v.length+A.length,function(b,d,g){t+=""+E(b,d,g)+"";a++});0"!==t&&(da+=''+t+"",jb++);r++});da+="";if("string"=== -b.outputMode)return da;if("base64"===b.outputMode)return S(da);T(da,b.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"===b.type&&"xmlss"===b.mso.fileFormat){var Ta=[],M=[];d(u).filter(function(){return O(d(this))}).each(function(){function a(a,b,c){var e=[];d(a).each(function(){var b=0,f=0;t="";G(this,"td,th",r,c+a.length,function(a,c,h){if(null!==a){var l="";c=E(a,c,h);h="String";if(!1!==jQuery.isNumeric(c))h="Number";else{var g=qb(c);!1!==g&&(c=g,h="Number",l+=' ss:StyleID="pct1"')}"Number"!== -h&&(c=c.replace(/\n/g,"
"));g=Q(a);a=ha(a);d.each(e,function(){if(r>=this.s.r&&r<=this.e.r&&f>=this.s.c&&f<=this.e.c)for(var a=0;a<=this.e.c-this.s.c;++a)f++,b++});if(a||g)a=a||1,g=g||1,e.push({s:{r:r,c:f},e:{r:r+a-1,c:f+g-1}});1'+d("
").text(c).html()+"\r";f++}});0\r'+ -t+"\r");r++});return a.length}var c=d(this),e="";"string"===typeof b.mso.worksheetName&&b.mso.worksheetName.length?e=b.mso.worksheetName+" "+(M.length+1):"undefined"!==typeof b.mso.worksheetName[M.length]&&(e=b.mso.worksheetName[M.length]);e.length||(e=c.find("caption").text()||"");e.length||(e="Table "+(M.length+1));e=d.trim(e.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));M.push(d("
").text(e).html());!1===b.exportHiddenCells&&(R=c.find("tr, th, td").filter(":hidden"),ka=0\r";e=a(X(c),"th,td",0);a(Y(c),"td,th",e);L+="\r";Ta.push(L)});for(var Da={},Ua={},ea,ra,oa=0,zb=M.length;oa"+G(a,b,d)+""});r++});da+="";var ib=1;y=X(d(v));d(y).each(function(){var a=1;u="";I(this,"td,th",r,z.length+y.length,function(b,d,h){u+=""+G(b,d,h)+"";a++});0"!==u&&(da+=''+u+"",ib++);r++});da+="";if("string"=== +b.outputMode)return da;if("base64"===b.outputMode)return R(da);S(da,b.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"===b.type&&"xmlss"===b.mso.fileFormat){var Ta=[],M=[];d(v).filter(function(){return O(d(this))}).each(function(){function a(a,b,c){var e=[];d(a).each(function(){var b=0,f=0;u="";I(this,"td,th",r,c+a.length,function(a,c,g){if(null!==a){var m="";c=G(a,c,g);g="String";if(!1!==jQuery.isNumeric(c))g="Number";else{var h=pb(c);!1!==h&&(c=h,g="Number",m+=' ss:StyleID="pct1"')}"Number"!== +g&&(c=c.replace(/\n/g,"
"));h=Y(a);a=ka(a);d.each(e,function(){if(r>=this.s.r&&r<=this.e.r&&f>=this.s.c&&f<=this.e.c)for(var a=0;a<=this.e.c-this.s.c;++a)f++,b++});if(a||h)a=a||1,h=h||1,e.push({s:{r:r,c:f},e:{r:r+a-1,c:f+h-1}});1'+d("
").text(c).html()+"\r";f++}});0\r'+ +u+"\r");r++});return a.length}var c=d(this),e="";"string"===typeof b.mso.worksheetName&&b.mso.worksheetName.length?e=b.mso.worksheetName+" "+(M.length+1):"undefined"!==typeof b.mso.worksheetName[M.length]&&(e=b.mso.worksheetName[M.length]);e.length||(e=c.find("caption").text()||"");e.length||(e="Table "+(M.length+1));e=d.trim(e.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));M.push(d("
").text(e).html());!1===b.exportHiddenCells&&(Q=c.find("tr, th, td").filter(":hidden"),ja=0\r";e=a(W(c),"th,td",0);a(X(c),"td,th",e);L+="\r";Ta.push(L)});for(var Da={},Ua={},ea,ra,oa=0,yb=M.length;oa\r\r\r \r\r\r 9000\r 13860\r 0\r 0\r False\r False\r\r\r \r \r \r\r', -Ea=0;Ea\r'+Ta[Ea],W=b.mso.rtl?W+'\r\r\r':W+'\r',W+="\r";W+="\r";if("string"===b.outputMode)return W;if("base64"===b.outputMode)return S(W);T(W,b.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"=== -b.type&&"xlsx"===b.mso.fileFormat){var sa=[],kb=XLSX.utils.book_new();d(u).filter(function(){return O(d(this))}).each(function(){for(var a=d(this),c,e={},g=this.getElementsByTagName("tr"),f=Math.min(1E7,g.length),k={s:{r:0,c:0},e:{r:0,c:0}},l=[],h,p=0,B=0,z,m,r,q,n,t=XLSX.SSF.get_table();pc||36c||48===c)u="n";else{if("date"===w.type||13c||44c||56===c)u="d"}else u="s";if(null!=C){if(0===C.length)h.t="z";else if(0!==C.trim().length&&"s"!==u)if("function"===w.type)h={f:C};else if("TRUE"===C)h={t:"b",v:!0};else if("FALSE"===C)h={t:"b",v:!1};else if("n"===u||isFinite(gb(C,b.numbers.output))){if(u= -gb(C,b.numbers.output),0===c&&"function"!==typeof b.mso.xlsx.formatId.numbers&&(c=b.mso.xlsx.formatId.numbers),isFinite(u)||isFinite(C))h={t:"n",v:isFinite(u)?u:C,z:"string"===typeof c?c:c in t?t[c]:c===b.mso.xlsx.formatId.currency?b.mso.xlsx.format.currency:"0.00"}}else if(!1!==(w=pb(C))||"d"===u)0===c&&"function"!==typeof b.mso.xlsx.formatId.date&&(c=b.mso.xlsx.formatId.date),h={t:"d",v:!1!==w?w:C,z:"string"===typeof c?c:c in t?t[c]:"m/d/yy"};(u=d(n).find("a"))&&u.length&&(u=u[0].hasAttribute("href")? -u.attr("href"):"",C="href"!==b.htmlHyperlink||""===u?C:"",w=""!==u?'=HYPERLINK("'+u+(C.length?'","'+C:"")+'")':"",""!==w&&("function"===typeof b.mso.xlsx.onHyperlink?(C=b.mso.xlsx.onHyperlink(d(n),p,z,u,C,w),h=0!==C.indexOf("=HYPERLINK")?{t:"s",v:C}:{f:C}):h={f:w}))}e[La({c:m,r:B})]=h;k.e.c=f&&(e["!fullref"]=Ma((k.e.r=g.length-p+B-1,k)));c="";"string"===typeof b.mso.worksheetName&& -b.mso.worksheetName.length?c=b.mso.worksheetName+" "+(sa.length+1):"undefined"!==typeof b.mso.worksheetName[sa.length]&&(c=b.mso.worksheetName[sa.length]);c.length||(c=a.find("caption").text()||"");c.length||(c="Table "+(sa.length+1));c=d.trim(c.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));sa.push(c);XLSX.utils.book_append_sheet(kb,e,c)});var Ab=XLSX.write(kb,{type:"binary",bookType:b.mso.fileFormat,bookSST:!1});T(sb(Ab),b.fileName+"."+b.mso.fileFormat,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", -"UTF-8","",!1)}else if("excel"===b.type||"xls"===b.type||"word"===b.type||"doc"===b.type){var ta="excel"===b.type||"xls"===b.type?"excel":"word",Bb="excel"===ta?"xls":"doc",Cb='xmlns:x="urn:schemas-microsoft-com:office:'+ta+'"',ua=L="";d(u).filter(function(){return O(d(this))}).each(function(){var a=d(this);""===ua&&(ua=b.mso.worksheetName||a.find("caption").text()||"Table",ua=d.trim(ua.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31)));!1===b.exportHiddenCells&&(R=a.find("tr, th, td").filter(":hidden"), -ka=0";v=X(a);d(v).each(function(){var a=d(this),e=document.defaultView.getComputedStyle(a[0],null);t="";G(this,"th,td",r,v.length,function(a,c,d){if(null!==a){var f="";t+=""}});0"+t+"");r++});L+="";A=Y(a);d(A).each(function(){var a=d(this),e=null,g=null;t="";G(this,"td,th",r,v.length+A.length,function(c,k,l){if(null!==c){var h=E(c,k,l),f="",m=d(c).attr("data-tableexport-msonumberformat");"undefined"===typeof m&&"function"===typeof b.mso.onMsoNumberFormat&&(m=b.mso.onMsoNumberFormat(c,k,l));"undefined"!==typeof m&&""!==m&&(f="style=\"mso-number-format:'"+ -m+"'");if(b.mso.styles.length){e=document.defaultView.getComputedStyle(c,null);g=null;for(var n in b.mso.styles)k=b.mso.styles[n],m=H(e,k),""===m&&(null===g&&(g=document.defaultView.getComputedStyle(a[0],null)),m=H(g,k)),""!==m&&"0px none rgb(0, 0, 0)"!==m&&"rgba(0, 0, 0, 0)"!==m&&(f+=""===f?'style="':";",f+=k+":"+m)}t+=""));t+=">"+h+""}}); -0"+t+"");r++});b.displayTableName&&(L+=""+E(d("

"+b.tableName+"

"))+"");L+=""});var n='';n+="";n+='';"excel"===ta&&(n+="\x3c!--[if gte mso 9]>",n+="",n+="",n+="",n+="", -n+="",n+=ua,n+="",n+="",n+="",b.mso.rtl&&(n+=""),n+="",n+="",n+="",n+="",n+="",n+="";n+="@page { size:"+b.mso.pageOrientation+"; mso-page-orientation:"+b.mso.pageOrientation+"; }";n+="@page Section1 {size:"+V[b.mso.pageFormat][0]+"pt "+V[b.mso.pageFormat][1]+"pt";n+="; margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}"; -n+="div.Section1 {page:Section1;}";n+="@page Section2 {size:"+V[b.mso.pageFormat][1]+"pt "+V[b.mso.pageFormat][0]+"pt";n+=";mso-page-orientation:"+b.mso.pageOrientation+";margin:1.25in 1.0in 1.25in 1.0in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";n+="div.Section2 {page:Section2;}";n+="br {mso-data-placement:same-cell;}";n+="";n+="";n+="";n+='
';n+=L;n+="
";n+="";n+=""; -if("string"===b.outputMode)return n;if("base64"===b.outputMode)return S(n);T(n,b.fileName+"."+Bb,"application/vnd.ms-"+ta,"","base64",!1)}else if("png"===b.type)html2canvas(d(u)[0]).then(function(a){a=a.toDataURL();for(var c=atob(a.substring(22)),d=new ArrayBuffer(c.length),g=new Uint8Array(d),f=0;flb){a>V.a0[0]&&(Fa="a0",va="l");for(var b in V)V.hasOwnProperty(b)&&V[b][1]>a&&(Fa=b,va="l",V[b][0]>a&&(va="p"));lb=a}}});b.jspdf.format=""===Fa?"a4":Fa;b.jspdf.orientation=""===va?"w":va}if(null==k.doc&&(k.doc=new jspdf.jsPDF(b.jspdf.orientation,b.jspdf.unit,b.jspdf.format),k.wScaleFactor=1,k.hScaleFactor=1,"function"===typeof b.jspdf.onDocCreated))b.jspdf.onDocCreated(k.doc);Ba.fontName=k.doc.getFont().fontName;!0===k.outputImages&&(k.images={});"undefined"!== -typeof k.images&&(d(u).filter(function(){return O(d(this))}).each(function(){var a=0;N=[];!1===b.exportHiddenCells&&(R=d(this).find("tr, th, td").filter(":hidden"),ka=0a.styles.rowHeight&&(a.styles.rowHeight=e)}a.styles.halign="inherit"===c.headerStyles.halign?"center":c.headerStyles.halign;a.styles.valign=c.headerStyles.valign;"undefined"!==typeof d.style&& -!0!==d.style.hidden&&("inherit"===c.headerStyles.halign&&(a.styles.halign=d.style.align),"inherit"===c.styles.fillColor&&(a.styles.fillColor=d.style.bcolor),"inherit"===c.styles.textColor&&(a.styles.textColor=d.style.color),"inherit"===c.styles.fontStyle&&(a.styles.fontStyle=d.style.fstyle))}});"function"!==typeof c.createdCell&&(c.createdCell=function(a,b){b=k.teCells[b.row.index+":"+b.column.dataKey];a.styles.halign="inherit"===c.styles.halign?"center":c.styles.halign;a.styles.valign=c.styles.valign; -"undefined"!==typeof b&&"undefined"!==typeof b.style&&!0!==b.style.hidden&&("inherit"===c.styles.halign&&(a.styles.halign=b.style.align),"inherit"===c.styles.fillColor&&(a.styles.fillColor=b.style.bcolor),"inherit"===c.styles.textColor&&(a.styles.textColor=b.style.color),"inherit"===c.styles.fontStyle&&(a.styles.fontStyle=b.style.fstyle))});"function"!==typeof c.drawHeaderCell&&(c.drawHeaderCell=function(a,b){var c=k.columns[b.column.dataKey];return(!0!==c.style.hasOwnProperty("hidden")||!0!==c.style.hidden)&& -0<=c.rowIndex?Za(a,b,c):!1});"function"!==typeof c.drawCell&&(c.drawCell=function(a,b){var c=k.teCells[b.row.index+":"+b.column.dataKey];if(!0!==("undefined"!==typeof c&&c.isCanvas))Za(a,b,c)&&(k.doc.rect(a.x,a.y,a.width,a.height,a.styles.fillStyle),"undefined"===typeof c||"undefined"!==typeof c.hasUserDefText&&!0===c.hasUserDefText||"undefined"===typeof c.elements||!c.elements.length?db(a,{},k):(b=a.height/c.rect.height,b>k.hScaleFactor&&(k.hScaleFactor=b),k.wScaleFactor=a.width/c.rect.width,b=a.textPos.y, -bb(a,c.elements,k),a.textPos.y=b,db(a,c.elements,k)));else{c=c.elements[0];var e=d(c).attr("data-tableexport-canvas"),f=c.getBoundingClientRect();a.width=f.width*k.wScaleFactor;a.height=f.height*k.hScaleFactor;b.row.height=a.height;Xa(a,c,e,k)}return!1});k.headerrows=[];v=X(d(this));d(v).each(function(){a=0;k.headerrows[r]=[];G(this,"th,td",r,v.length,function(b,c,d){var e=fb(b);e.title=E(b,c,d);e.key=a++;e.rowIndex=r;k.headerrows[r].push(e)});r++});if(0\r'+Ta[Ea],V=b.mso.rtl?V+'\r\r\r':V+'\r',V+="\r";V+="\r";if("string"===b.outputMode)return V;if("base64"===b.outputMode)return R(V);S(V,b.fileName+".xml","application/xml","utf-8","base64",!1)}else if("excel"=== +b.type&&"xlsx"===b.mso.fileFormat){var sa=[],jb=XLSX.utils.book_new();d(v).filter(function(){return O(d(this))}).each(function(){for(var a=d(this),c,e={},h=this.getElementsByTagName("tr"),f=Math.min(1E7,h.length),k={s:{r:0,c:0},e:{r:0,c:0}},m=[],g,p=0,B=0,A,l,r,q,n,t=XLSX.SSF.get_table();pc||36c||48===c)v="n";else{if("date"===y.type||13c||44c||56===c)v="d"}else v="s";if(null!=C){if(0===C.length)g.t="z";else if(0!==C.trim().length&&"s"!==v)if("function"===y.type)g={f:C};else if("TRUE"===C)g={t:"b",v:!0};else if("FALSE"===C)g={t:"b",v:!1};else if("n"===v||isFinite(fb(C,b.numbers.output))){if(v= +fb(C,b.numbers.output),0===c&&"function"!==typeof b.mso.xlsx.formatId.numbers&&(c=b.mso.xlsx.formatId.numbers),isFinite(v)||isFinite(C))g={t:"n",v:isFinite(v)?v:C,z:"string"===typeof c?c:c in t?t[c]:c===b.mso.xlsx.formatId.currency?b.mso.xlsx.format.currency:"0.00"}}else if(!1!==(y=ob(C))||"d"===v)0===c&&"function"!==typeof b.mso.xlsx.formatId.date&&(c=b.mso.xlsx.formatId.date),g={t:"d",v:!1!==y?y:C,z:"string"===typeof c?c:c in t?t[c]:"m/d/yy"};(v=d(n).find("a"))&&v.length&&(v=v[0].hasAttribute("href")? +v.attr("href"):"",C="href"!==b.htmlHyperlink||""===v?C:"",y=""!==v?'=HYPERLINK("'+v+(C.length?'","'+C:"")+'")':"",""!==y&&("function"===typeof b.mso.xlsx.onHyperlink?(C=b.mso.xlsx.onHyperlink(d(n),p,A,v,C,y),g=0!==C.indexOf("=HYPERLINK")?{t:"s",v:C}:{f:C}):g={f:y}))}e[La({c:l,r:B})]=g;k.e.c=f&&(e["!fullref"]=Ma((k.e.r=h.length-p+B-1,k)));c="";"string"===typeof b.mso.worksheetName&& +b.mso.worksheetName.length?c=b.mso.worksheetName+" "+(sa.length+1):"undefined"!==typeof b.mso.worksheetName[sa.length]&&(c=b.mso.worksheetName[sa.length]);c.length||(c=a.find("caption").text()||"");c.length||(c="Table "+(sa.length+1));c=d.trim(c.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31));sa.push(c);XLSX.utils.book_append_sheet(jb,e,c)});var zb=XLSX.write(jb,{type:"binary",bookType:b.mso.fileFormat,bookSST:!1});S(rb(zb),b.fileName+"."+b.mso.fileFormat,"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", +"UTF-8","",!1)}else if("excel"===b.type||"xls"===b.type||"word"===b.type||"doc"===b.type){var ta="excel"===b.type||"xls"===b.type?"excel":"word",Ab="excel"===ta?"xls":"doc",Bb='xmlns:x="urn:schemas-microsoft-com:office:'+ta+'"',ua=L="";d(v).filter(function(){return O(d(this))}).each(function(){var a=d(this);""===ua&&(ua=b.mso.worksheetName||a.find("caption").text()||"Table",ua=d.trim(ua.replace(/[\\\/[\]*:?'"]/g,"").substring(0,31)));!1===b.exportHiddenCells&&(Q=a.find("tr, th, td").filter(":hidden"), +ja=0";z=W(a);d(z).each(function(){var a=d(this),e=document.defaultView.getComputedStyle(a[0],null);u="";I(this,"th,td",r,z.length,function(a,c,d){if(null!==a){var f="";u+=""}});0"+u+"");r++});L+="";y=X(a);d(y).each(function(){var a=d(this),e=null,h=null;u="";I(this,"td,th",r,z.length+y.length,function(c,k,m){if(null!==c){var g=G(c,k,m),f="",l=d(c).attr("data-tableexport-msonumberformat");"undefined"===typeof l&&"function"===typeof b.mso.onMsoNumberFormat&&(l=b.mso.onMsoNumberFormat(c,k,m));"undefined"!==typeof l&&""!==l&&(f="style=\"mso-number-format:'"+ +l+"'");if(b.mso.styles.length){e=document.defaultView.getComputedStyle(c,null);h=null;for(var n in b.mso.styles)k=b.mso.styles[n],l=J(e,k),""===l&&(null===h&&(h=document.defaultView.getComputedStyle(a[0],null)),l=J(h,k)),""!==l&&"0px none rgb(0, 0, 0)"!==l&&"rgba(0, 0, 0, 0)"!==l&&(f+=""===f?'style="':";",f+=k+":"+l)}u+=""));u+=">"+g+""}}); +0"+u+"");r++});b.displayTableName&&(L+=""+G(d("

"+b.tableName+"

"))+"");L+=""});var n='';n+="";n+='';"excel"===ta&&(n+="\x3c!--[if gte mso 9]>",n+="",n+="",n+="",n+="", +n+="",n+=ua,n+="",n+="",n+="",b.mso.rtl&&(n+=""),n+="",n+="",n+="",n+="",n+="",n+="";n+="@page { size:"+b.mso.pageOrientation+"; mso-page-orientation:"+b.mso.pageOrientation+"; }";n+="@page Section1 {size:"+U[b.mso.pageFormat][0]+"pt "+U[b.mso.pageFormat][1]+"pt";n+="; margin:1.0in 1.25in 1.0in 1.25in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}"; +n+="div.Section1 {page:Section1;}";n+="@page Section2 {size:"+U[b.mso.pageFormat][1]+"pt "+U[b.mso.pageFormat][0]+"pt";n+=";mso-page-orientation:"+b.mso.pageOrientation+";margin:1.25in 1.0in 1.25in 1.0in;mso-header-margin:.5in;mso-footer-margin:.5in;mso-paper-source:0;}";n+="div.Section2 {page:Section2;}";n+="br {mso-data-placement:same-cell;}";n+="";n+="";n+="";n+='
';n+=L;n+="
";n+="";n+=""; +if("string"===b.outputMode)return n;if("base64"===b.outputMode)return R(n);S(n,b.fileName+"."+Ab,"application/vnd.ms-"+ta,"","base64",!1)}else if("png"===b.type)html2canvas(d(v)[0]).then(function(a){a=a.toDataURL();for(var c=atob(a.substring(22)),d=new ArrayBuffer(c.length),h=new Uint8Array(d),f=0;fa?k:a;for(a=c.length;akb){a>U.a0[0]&&(Fa="a0",va="l");for(var b in U)U.hasOwnProperty(b)&&U[b][1]>a&&(Fa=b,va="l",U[b][0]>a&&(va="p"));kb=a}}});b.jspdf.format=""=== +Fa?"a4":Fa;b.jspdf.orientation=""===va?"w":va}if(null==k.doc&&(k.doc=new jspdf.jsPDF(b.jspdf.orientation,b.jspdf.unit,b.jspdf.format),k.wScaleFactor=1,k.hScaleFactor=1,"function"===typeof b.jspdf.onDocCreated))b.jspdf.onDocCreated(k.doc);Ba.fontName=k.doc.getFont().fontName;!0===k.outputImages&&(k.images={});"undefined"!==typeof k.images&&(d(v).filter(function(){return O(d(this))}).each(function(){var a=0;N=[];!1===b.exportHiddenCells&&(Q=d(this).find("tr, th, td").filter(":hidden"),ja=0a.styles.rowHeight&&(a.styles.rowHeight=e)}a.styles.halign="inherit"===c.headerStyles.halign?"center":c.headerStyles.halign;a.styles.valign=c.headerStyles.valign;"undefined"!==typeof d.style&&!0!==d.style.hidden&&("inherit"===c.headerStyles.halign&&(a.styles.halign=d.style.align),"inherit"===c.styles.fillColor&&(a.styles.fillColor=d.style.bcolor),"inherit"===c.styles.textColor&&(a.styles.textColor=d.style.color), +"inherit"===c.styles.fontStyle&&(a.styles.fontStyle=d.style.fstyle))}});"function"!==typeof c.createdCell&&(c.createdCell=function(a,b){b=k.teCells[b.row.index+":"+b.column.dataKey];a.styles.halign="inherit"===c.styles.halign?"center":c.styles.halign;a.styles.valign=c.styles.valign;"undefined"!==typeof b&&"undefined"!==typeof b.style&&!0!==b.style.hidden&&("inherit"===c.styles.halign&&(a.styles.halign=b.style.align),"inherit"===c.styles.fillColor&&(a.styles.fillColor=b.style.bcolor),"inherit"===c.styles.textColor&& +(a.styles.textColor=b.style.color),"inherit"===c.styles.fontStyle&&(a.styles.fontStyle=b.style.fstyle))});"function"!==typeof c.drawHeaderCell&&(c.drawHeaderCell=function(a,b){var c=k.columns[b.column.dataKey];return(!0!==c.style.hasOwnProperty("hidden")||!0!==c.style.hidden)&&0<=c.rowIndex?Za(a,b,c):!1});"function"!==typeof c.drawCell&&(c.drawCell=function(a,b){var c=k.teCells[b.row.index+":"+b.column.dataKey];if(!0!==("undefined"!==typeof c&&c.isCanvas))Za(a,b,c)&&(k.doc.rect(a.x,a.y,a.width,a.height, +a.styles.fillStyle),"undefined"===typeof c||"undefined"!==typeof c.hasUserDefText&&!0===c.hasUserDefText||"undefined"===typeof c.elements||!c.elements.length?db(a,{},k):(b=a.height/c.rect.height,b>k.hScaleFactor&&(k.hScaleFactor=b),k.wScaleFactor=a.width/c.rect.width,b=a.textPos.y,bb(a,c.elements,k),a.textPos.y=b,db(a,c.elements,k)));else{c=c.elements[0];var e=d(c).attr("data-tableexport-canvas"),f=c.getBoundingClientRect();a.width=f.width*k.wScaleFactor;a.height=f.height*k.hScaleFactor;b.row.height= +a.height;Xa(a,c,e,k)}return!1});k.headerrows=[];z=W(d(this));d(z).each(function(){a=0;k.headerrows[r]=[];I(this,"th,td",r,z.length,function(b,c,d){var e=Ka(b);e.title=G(b,c,d);e.key=a++;e.rowIndex=r;k.headerrows[r].push(e)});r++});if(0 PDF PDF (pdfmake colspan & rowspan)
  • - + PDF PDF (multiple tables)
  • @@ -301,5 +301,32 @@

    Table with rowspan and colspan

    +

    Table with different col alignment

    + + + + + + + + + + + + + + + + + + + + + + + + +
    Table with different col alignment
    DescriptionValue 1Value 2
    Not available00
     00
    +