hhurz / tableExport.jquery.plugin

jQuery plugin to export a html table to JSON, XML, CSV, TSV, TXT, SQL, Word, Excel, PNG and PDF
MIT License
990 stars 716 forks source link

First Heading ROW not exported only in PDF format #260

Open Aragorn2004 opened 5 years ago

Aragorn2004 commented 5 years ago

Hi, i've a table where heading has two rows. The first row is not exported in PDF file in others format has exported well.

is it a bug or i made a mistake?

HEAD
ID NAME DatePers Level1 Level2 Level3
           <thead>
                    <tr>
                        <th class="col-xs-12" colspan="6">HEAD</th>
                    </tr>
                    <tr>
                        <th class="col-xs-2" data-field="ID">ID</th>
                        <th class="col-xs-4" data-field="NAME">NAME</th>
                        <th class="col-xs-1" data-field="DATAPERS">DatePers</th>
                        <th class="col-xs-1 text-center" data-field="Level1">Level1</th>
                        <th class="col-xs-3" data-field="Level2">Level2</th>
                        <th class="col-xs-1" data-field="Level3">Level3</th>
                    </tr>
                 </thead>
hhurz commented 5 years ago

Hi, did't you ask this already in issue #258 ? This issue is neither your mistake nor a bug, but it is a missing feature, Actually it's not possible to export more than one header row when exporting to pdf using jspdf-autotable. Thats a limitation of the version of jspdf-autotable plugin, which is used by tableExport.jquery.plugin. I'm not sure if an update to a recent version of jspdf-autotable would fix this. But an update would at least require a major rework of the plugins pdf output process, what I'm not able to do. An alternative could be using pdfmake to export in pdf format instead. See also issues #139 and #245