Docautotable Help

Just starting out? Need help? Post your questions and find answers here.
loulou2522
Posts: 49
Joined: Wed Mar 18, 2015 5:52 am

Docautotable Help

Post by loulou2522 »

Hi all,
What is wrong in my programm ? I don't arrive to anything

Code: Select all

Procedure Main()
  
!function generate() {  
 !   var doc = new jsPDF('p', 'pt', 'letter');  
  !  var htmlstring = '';  
   ! var tempVarToCheckPageHeight = 0;  
   ! var pageHeight = 0;  
   ! pageHeight = doc.internal.pageSize.height;  
   ! specialElementHandlers = {  
    !    // element with id of "bypass" - jQuery style selector  
    !    '#bypassme': function(element, renderer) {  
     !       // true = "handled elsewhere, bypass text extraction"  
     !       return true  
      !  }  
   ! };  
   ! margins = {  
   !     top: 150,  
   !     bottom: 60,  
   !     left: 40,  
   !     right: 40,  
   !     width: 600  
   ! };  
    !var y = 20;  
    !doc.setLineWidth(2);  
    !doc.text(200, y = y + 30, "TOTAL MARKS OF STUDENTS");  
    !doc.autoTable({  
     !   html: '#simple_table',  
      !  startY: 70,  
      !  theme: 'grid',  
      !  columnStyles: {  
       !     0: {  
         !       cellWidth: 180,  
        !    },  
          !  1: {  
           !     cellWidth: 180,  
           ! },  
           ! 2: {  
            !    cellWidth: 180,  
          !  }  
       ! },  
       ! styles: {  
        !    minCellHeight: 20  
        !}  
   ! })  
   ! doc.save('Marks_Of_Students.pdf');  
  ! generate();
!}  
  
EndProcedure


!require(["https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.5.6/jspdf.plugin.autotable.min.js"]);  
! require(["https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.5.3/jspdf.min.js"], function(jsPDF) {
!   window.jsPDF = jsPDF.jsPDF;
Main()
! });
Anay help will be appreciated
loulou2522
Posts: 49
Joined: Wed Mar 18, 2015 5:52 am

Re: Docautotable Help

Post by loulou2522 »

No one can help me ?
Post Reply