0

using this code generating pdf

$(function () {
            console.log('run fn');
            var specialElementHandlers = {
                '#editor': function (element, renderer) {
                    return true;
                }
            };
            $('#cmd').click(function () {
                $(this).val('Pending Request');
                var doc = new jsPDF();
                doc.fromHTML($('#target').html(), 15, 15, {
                    'width': 170, 'elementHandlers': specialElementHandlers
                });
                doc.save('report-file.pdf');              
            });
        });

and i have multiple html table i want to display them in pdf but this code producing blank pdf. while if i remove html tables and write simple text then that text is showing.

i have also tried this another code (using ) but this is not showing in well format columns are mingled with each other

<a href="#" onclick ="$('#bb').tableExport({type:'pdf',separator: ',', escape:'false', pdfFontSize:8, pdfLeftMargin:35});">As PDF</a>
Mohammad Faizan khan
  • 1,213
  • 3
  • 17
  • 32
  • Which version of jsPDF you are using? and have you reference any jspdf plugin. This [How to properly use jsPDF library](http://stackoverflow.com/questions/16858954/how-to-properly-use-jspdf-library) might help you. – Satpal Mar 17 '15 at 09:44
  • i am using latest jsPDF i have seen this it did not help me – Mohammad Faizan khan Mar 17 '15 at 09:50

0 Answers0