How to give borders to jspdf autotable content generated dynamically as in template The 2019 Stack Overflow Developer Survey Results Are InJSPdf autotable header borderAngular2 + jspdf-autotable linebreak not workingHow to test jspdf autotable empty cells?jsPDF AutoTable - autoTable is not a functionHaving an error with installation of jspdf and jspdf-autotableHow to pass data through JSON to jsPDF autotablehow to use jsPDF and jspdf-autotable in angular 5autotable not found in jsPDFDynamic cell color in jspdf autoTable?How to detect height jsPDF-AutoTable

Is Cinnamon a desktop environment or a window manager? (Or both?)

If I can cast sorceries at instant speed, can I use sorcery-speed activated abilities at instant speed?

Flight paths in orbit around Ceres?

Did Scotland spend $250,000 for the slogan "Welcome to Scotland"?

Button changing its text & action. Good or terrible?

Why “相同意思的词” is called “同义词” instead of "同意词"?

How to notate time signature switching consistently every measure

Geography at the pixel level

What information about me do stores get via my credit card?

Did the UK government pay "millions and millions of dollars" to try to snag Julian Assange?

Why are there uneven bright areas in this photo of black hole?

How do you keep chess fun when your opponent constantly beats you?

What do hard-Brexiteers want with respect to the Irish border?

Does HR tell a hiring manager about salary negotiations?

What is the most efficient way to store a numeric range?

Loose spokes after only a few rides

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?

Can there be female White Walkers?

Is bread bad for ducks?

Inverse Relationship Between Precision and Recall

Are spiders unable to hurt humans, especially very small spiders?

Why doesn't shell automatically fix "useless use of cat"?

How do I free up internal storage if I don't have any apps downloaded?

Output the Arecibo Message



How to give borders to jspdf autotable content generated dynamically as in template



The 2019 Stack Overflow Developer Survey Results Are InJSPdf autotable header borderAngular2 + jspdf-autotable linebreak not workingHow to test jspdf autotable empty cells?jsPDF AutoTable - autoTable is not a functionHaving an error with installation of jspdf and jspdf-autotableHow to pass data through JSON to jsPDF autotablehow to use jsPDF and jspdf-autotable in angular 5autotable not found in jsPDFDynamic cell color in jspdf autoTable?How to detect height jsPDF-AutoTable



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















i am using jspdf autotable to generate pdf, but i am failing to put borders as in the template.
Can anyone help me to sort it out.
i need the pdf viewed to be as in template.



Need border of header to have 2 border lines as shown here in template.



enter image description here



Last rows of total to be displayed like this.



enter image description here



TS:



captureScreen() 
this.displayTable = true;
var doc = new jsPDF();
var col = ["2006", "Budgeted Operating Expenses ", 'Exclude', 'Expenses'];
var rows = [];
for (var i = 0; i < this.items.budget.length; i++)
var temp = []
for (var key in this.items.budget[i])
temp.push(this.items.budget[i][key])

rows.push(temp);

doc.text(100, 10, this.items.title.title);
doc.text(20, 20, "Insert Property Name Here");
doc.setFont("Times New Roman");
doc.setFontSize(12);
doc.text(20, 30, "Tenant:");
doc.text(40, 30, this.items.owner.company);

doc.text(20, 40, "Address:");
doc.text(40, 40,this.items.owner.address);

doc.text(20, 50, "Suite:");
doc.text(40, 50,this.items.owner.suite);


doc.autoTable(col, rows,
tableLineColor: [189, 195, 199],
tableLineWidth: 0.75,
theme:"plain",
startY: 60,
margin:
top: 60
,
headerStyles:
//Not getting what to be done here
,
);
document.getElementById("convertToPdf").setAttribute('src', doc.output('datauri'))



DEMO
Thanks in advance.










share|improve this question




























    0















    i am using jspdf autotable to generate pdf, but i am failing to put borders as in the template.
    Can anyone help me to sort it out.
    i need the pdf viewed to be as in template.



    Need border of header to have 2 border lines as shown here in template.



    enter image description here



    Last rows of total to be displayed like this.



    enter image description here



    TS:



    captureScreen() 
    this.displayTable = true;
    var doc = new jsPDF();
    var col = ["2006", "Budgeted Operating Expenses ", 'Exclude', 'Expenses'];
    var rows = [];
    for (var i = 0; i < this.items.budget.length; i++)
    var temp = []
    for (var key in this.items.budget[i])
    temp.push(this.items.budget[i][key])

    rows.push(temp);

    doc.text(100, 10, this.items.title.title);
    doc.text(20, 20, "Insert Property Name Here");
    doc.setFont("Times New Roman");
    doc.setFontSize(12);
    doc.text(20, 30, "Tenant:");
    doc.text(40, 30, this.items.owner.company);

    doc.text(20, 40, "Address:");
    doc.text(40, 40,this.items.owner.address);

    doc.text(20, 50, "Suite:");
    doc.text(40, 50,this.items.owner.suite);


    doc.autoTable(col, rows,
    tableLineColor: [189, 195, 199],
    tableLineWidth: 0.75,
    theme:"plain",
    startY: 60,
    margin:
    top: 60
    ,
    headerStyles:
    //Not getting what to be done here
    ,
    );
    document.getElementById("convertToPdf").setAttribute('src', doc.output('datauri'))



    DEMO
    Thanks in advance.










    share|improve this question
























      0












      0








      0








      i am using jspdf autotable to generate pdf, but i am failing to put borders as in the template.
      Can anyone help me to sort it out.
      i need the pdf viewed to be as in template.



      Need border of header to have 2 border lines as shown here in template.



      enter image description here



      Last rows of total to be displayed like this.



      enter image description here



      TS:



      captureScreen() 
      this.displayTable = true;
      var doc = new jsPDF();
      var col = ["2006", "Budgeted Operating Expenses ", 'Exclude', 'Expenses'];
      var rows = [];
      for (var i = 0; i < this.items.budget.length; i++)
      var temp = []
      for (var key in this.items.budget[i])
      temp.push(this.items.budget[i][key])

      rows.push(temp);

      doc.text(100, 10, this.items.title.title);
      doc.text(20, 20, "Insert Property Name Here");
      doc.setFont("Times New Roman");
      doc.setFontSize(12);
      doc.text(20, 30, "Tenant:");
      doc.text(40, 30, this.items.owner.company);

      doc.text(20, 40, "Address:");
      doc.text(40, 40,this.items.owner.address);

      doc.text(20, 50, "Suite:");
      doc.text(40, 50,this.items.owner.suite);


      doc.autoTable(col, rows,
      tableLineColor: [189, 195, 199],
      tableLineWidth: 0.75,
      theme:"plain",
      startY: 60,
      margin:
      top: 60
      ,
      headerStyles:
      //Not getting what to be done here
      ,
      );
      document.getElementById("convertToPdf").setAttribute('src', doc.output('datauri'))



      DEMO
      Thanks in advance.










      share|improve this question














      i am using jspdf autotable to generate pdf, but i am failing to put borders as in the template.
      Can anyone help me to sort it out.
      i need the pdf viewed to be as in template.



      Need border of header to have 2 border lines as shown here in template.



      enter image description here



      Last rows of total to be displayed like this.



      enter image description here



      TS:



      captureScreen() 
      this.displayTable = true;
      var doc = new jsPDF();
      var col = ["2006", "Budgeted Operating Expenses ", 'Exclude', 'Expenses'];
      var rows = [];
      for (var i = 0; i < this.items.budget.length; i++)
      var temp = []
      for (var key in this.items.budget[i])
      temp.push(this.items.budget[i][key])

      rows.push(temp);

      doc.text(100, 10, this.items.title.title);
      doc.text(20, 20, "Insert Property Name Here");
      doc.setFont("Times New Roman");
      doc.setFontSize(12);
      doc.text(20, 30, "Tenant:");
      doc.text(40, 30, this.items.owner.company);

      doc.text(20, 40, "Address:");
      doc.text(40, 40,this.items.owner.address);

      doc.text(20, 50, "Suite:");
      doc.text(40, 50,this.items.owner.suite);


      doc.autoTable(col, rows,
      tableLineColor: [189, 195, 199],
      tableLineWidth: 0.75,
      theme:"plain",
      startY: 60,
      margin:
      top: 60
      ,
      headerStyles:
      //Not getting what to be done here
      ,
      );
      document.getElementById("convertToPdf").setAttribute('src', doc.output('datauri'))



      DEMO
      Thanks in advance.







      angular jspdf-autotable






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 22 at 4:42









      BhrungarajniBhrungarajni

      7651823




      7651823






















          1 Answer
          1






          active

          oldest

          votes


















          1














          jsPdf-autotable has no tools "from the box" for creating cell borders in (top || right || bottom || left) or double bourder.


          You may use jspdf methods for manualy paint necessary elements (lines):



          doc.autoTable(col, rows, 
          tableLineColor: [189, 195, 199],
          tableLineWidth: 0.75,
          theme: "plain",
          startY: 60,
          margin:
          top: 60
          ,
          drawRow: (row, data) =>
          //-------------------------------
          // Paint double lines bellow cell
          //-------------------------------
          let firstCell = row.cells[0];
          let secondCell = row.cells[1];
          if (firstCell.text == 'Total due anually')
          let borderLineOffset = 1;
          const columnWidth = data.table.columns[3].width;
          data.doc.line(data.cursor.x - columnWidth, data.cursor.y + row.height - borderLineOffset / 2, data.cursor.x, data.cursor.y + row.height - borderLineOffset / 2);
          data.doc.line(data.cursor.x - columnWidth, data.cursor.y + row.height + borderLineOffset / 2, data.cursor.x, data.cursor.y + row.height + borderLineOffset / 2);

          //-------------------------------
          // Paint footer line
          //-------------------------------
          if (secondCell.text == 'Totally sales Tax')
          data.doc.line(data.cursor.x - data.table.width, data.cursor.y + row.height, data.cursor.x, data.cursor.y + row.height);
          data.doc.line(data.cursor.x - data.table.width, data.cursor.y + row.height, data.cursor.x, data.cursor.y + row.height);

          ,
          drawHeaderRow: (head, data) =>
          //---------------------------------------
          // Write the line at the bottom of header
          //---------------------------------------
          data.doc.line(data.cursor.x, data.cursor.y + head.height, data.cursor.x + data.table.width, data.cursor.y + head.height);

          );


          Here you may found other elements for paint them in pdf.
          jsPdf docs
          StackBlitz






          share|improve this answer

























          • Thanks for response, but i dont need that middle lines from the headers

            – Bhrungarajni
            Mar 22 at 6:44











          • @Bhrungarajni updated anwser with line painting

            – Ivanes
            Mar 22 at 8:10











          • ya thank you, but the data will come dynamically so we cant predict these will be the properties and al

            – Bhrungarajni
            Mar 22 at 9:04











          • @Bhrungarajni As you can see, I add lines based not on the static coordinates, but on the coordinates of the cells that were generated based on the data. I define these cells by their unique field (inner text), if the set of basic data in the table changes, but the cells with these unique fields remain, the lines will be drawn where necessary automatically

            – Ivanes
            Mar 22 at 9:09











          • no no thats correct, i have edited my stackblitz with your code, in that i removed table border, can you pls help me to get a border above the header same as in below header.

            – Bhrungarajni
            Mar 22 at 9:15











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55293032%2fhow-to-give-borders-to-jspdf-autotable-content-generated-dynamically-as-in-templ%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          jsPdf-autotable has no tools "from the box" for creating cell borders in (top || right || bottom || left) or double bourder.


          You may use jspdf methods for manualy paint necessary elements (lines):



          doc.autoTable(col, rows, 
          tableLineColor: [189, 195, 199],
          tableLineWidth: 0.75,
          theme: "plain",
          startY: 60,
          margin:
          top: 60
          ,
          drawRow: (row, data) =>
          //-------------------------------
          // Paint double lines bellow cell
          //-------------------------------
          let firstCell = row.cells[0];
          let secondCell = row.cells[1];
          if (firstCell.text == 'Total due anually')
          let borderLineOffset = 1;
          const columnWidth = data.table.columns[3].width;
          data.doc.line(data.cursor.x - columnWidth, data.cursor.y + row.height - borderLineOffset / 2, data.cursor.x, data.cursor.y + row.height - borderLineOffset / 2);
          data.doc.line(data.cursor.x - columnWidth, data.cursor.y + row.height + borderLineOffset / 2, data.cursor.x, data.cursor.y + row.height + borderLineOffset / 2);

          //-------------------------------
          // Paint footer line
          //-------------------------------
          if (secondCell.text == 'Totally sales Tax')
          data.doc.line(data.cursor.x - data.table.width, data.cursor.y + row.height, data.cursor.x, data.cursor.y + row.height);
          data.doc.line(data.cursor.x - data.table.width, data.cursor.y + row.height, data.cursor.x, data.cursor.y + row.height);

          ,
          drawHeaderRow: (head, data) =>
          //---------------------------------------
          // Write the line at the bottom of header
          //---------------------------------------
          data.doc.line(data.cursor.x, data.cursor.y + head.height, data.cursor.x + data.table.width, data.cursor.y + head.height);

          );


          Here you may found other elements for paint them in pdf.
          jsPdf docs
          StackBlitz






          share|improve this answer

























          • Thanks for response, but i dont need that middle lines from the headers

            – Bhrungarajni
            Mar 22 at 6:44











          • @Bhrungarajni updated anwser with line painting

            – Ivanes
            Mar 22 at 8:10











          • ya thank you, but the data will come dynamically so we cant predict these will be the properties and al

            – Bhrungarajni
            Mar 22 at 9:04











          • @Bhrungarajni As you can see, I add lines based not on the static coordinates, but on the coordinates of the cells that were generated based on the data. I define these cells by their unique field (inner text), if the set of basic data in the table changes, but the cells with these unique fields remain, the lines will be drawn where necessary automatically

            – Ivanes
            Mar 22 at 9:09











          • no no thats correct, i have edited my stackblitz with your code, in that i removed table border, can you pls help me to get a border above the header same as in below header.

            – Bhrungarajni
            Mar 22 at 9:15















          1














          jsPdf-autotable has no tools "from the box" for creating cell borders in (top || right || bottom || left) or double bourder.


          You may use jspdf methods for manualy paint necessary elements (lines):



          doc.autoTable(col, rows, 
          tableLineColor: [189, 195, 199],
          tableLineWidth: 0.75,
          theme: "plain",
          startY: 60,
          margin:
          top: 60
          ,
          drawRow: (row, data) =>
          //-------------------------------
          // Paint double lines bellow cell
          //-------------------------------
          let firstCell = row.cells[0];
          let secondCell = row.cells[1];
          if (firstCell.text == 'Total due anually')
          let borderLineOffset = 1;
          const columnWidth = data.table.columns[3].width;
          data.doc.line(data.cursor.x - columnWidth, data.cursor.y + row.height - borderLineOffset / 2, data.cursor.x, data.cursor.y + row.height - borderLineOffset / 2);
          data.doc.line(data.cursor.x - columnWidth, data.cursor.y + row.height + borderLineOffset / 2, data.cursor.x, data.cursor.y + row.height + borderLineOffset / 2);

          //-------------------------------
          // Paint footer line
          //-------------------------------
          if (secondCell.text == 'Totally sales Tax')
          data.doc.line(data.cursor.x - data.table.width, data.cursor.y + row.height, data.cursor.x, data.cursor.y + row.height);
          data.doc.line(data.cursor.x - data.table.width, data.cursor.y + row.height, data.cursor.x, data.cursor.y + row.height);

          ,
          drawHeaderRow: (head, data) =>
          //---------------------------------------
          // Write the line at the bottom of header
          //---------------------------------------
          data.doc.line(data.cursor.x, data.cursor.y + head.height, data.cursor.x + data.table.width, data.cursor.y + head.height);

          );


          Here you may found other elements for paint them in pdf.
          jsPdf docs
          StackBlitz






          share|improve this answer

























          • Thanks for response, but i dont need that middle lines from the headers

            – Bhrungarajni
            Mar 22 at 6:44











          • @Bhrungarajni updated anwser with line painting

            – Ivanes
            Mar 22 at 8:10











          • ya thank you, but the data will come dynamically so we cant predict these will be the properties and al

            – Bhrungarajni
            Mar 22 at 9:04











          • @Bhrungarajni As you can see, I add lines based not on the static coordinates, but on the coordinates of the cells that were generated based on the data. I define these cells by their unique field (inner text), if the set of basic data in the table changes, but the cells with these unique fields remain, the lines will be drawn where necessary automatically

            – Ivanes
            Mar 22 at 9:09











          • no no thats correct, i have edited my stackblitz with your code, in that i removed table border, can you pls help me to get a border above the header same as in below header.

            – Bhrungarajni
            Mar 22 at 9:15













          1












          1








          1







          jsPdf-autotable has no tools "from the box" for creating cell borders in (top || right || bottom || left) or double bourder.


          You may use jspdf methods for manualy paint necessary elements (lines):



          doc.autoTable(col, rows, 
          tableLineColor: [189, 195, 199],
          tableLineWidth: 0.75,
          theme: "plain",
          startY: 60,
          margin:
          top: 60
          ,
          drawRow: (row, data) =>
          //-------------------------------
          // Paint double lines bellow cell
          //-------------------------------
          let firstCell = row.cells[0];
          let secondCell = row.cells[1];
          if (firstCell.text == 'Total due anually')
          let borderLineOffset = 1;
          const columnWidth = data.table.columns[3].width;
          data.doc.line(data.cursor.x - columnWidth, data.cursor.y + row.height - borderLineOffset / 2, data.cursor.x, data.cursor.y + row.height - borderLineOffset / 2);
          data.doc.line(data.cursor.x - columnWidth, data.cursor.y + row.height + borderLineOffset / 2, data.cursor.x, data.cursor.y + row.height + borderLineOffset / 2);

          //-------------------------------
          // Paint footer line
          //-------------------------------
          if (secondCell.text == 'Totally sales Tax')
          data.doc.line(data.cursor.x - data.table.width, data.cursor.y + row.height, data.cursor.x, data.cursor.y + row.height);
          data.doc.line(data.cursor.x - data.table.width, data.cursor.y + row.height, data.cursor.x, data.cursor.y + row.height);

          ,
          drawHeaderRow: (head, data) =>
          //---------------------------------------
          // Write the line at the bottom of header
          //---------------------------------------
          data.doc.line(data.cursor.x, data.cursor.y + head.height, data.cursor.x + data.table.width, data.cursor.y + head.height);

          );


          Here you may found other elements for paint them in pdf.
          jsPdf docs
          StackBlitz






          share|improve this answer















          jsPdf-autotable has no tools "from the box" for creating cell borders in (top || right || bottom || left) or double bourder.


          You may use jspdf methods for manualy paint necessary elements (lines):



          doc.autoTable(col, rows, 
          tableLineColor: [189, 195, 199],
          tableLineWidth: 0.75,
          theme: "plain",
          startY: 60,
          margin:
          top: 60
          ,
          drawRow: (row, data) =>
          //-------------------------------
          // Paint double lines bellow cell
          //-------------------------------
          let firstCell = row.cells[0];
          let secondCell = row.cells[1];
          if (firstCell.text == 'Total due anually')
          let borderLineOffset = 1;
          const columnWidth = data.table.columns[3].width;
          data.doc.line(data.cursor.x - columnWidth, data.cursor.y + row.height - borderLineOffset / 2, data.cursor.x, data.cursor.y + row.height - borderLineOffset / 2);
          data.doc.line(data.cursor.x - columnWidth, data.cursor.y + row.height + borderLineOffset / 2, data.cursor.x, data.cursor.y + row.height + borderLineOffset / 2);

          //-------------------------------
          // Paint footer line
          //-------------------------------
          if (secondCell.text == 'Totally sales Tax')
          data.doc.line(data.cursor.x - data.table.width, data.cursor.y + row.height, data.cursor.x, data.cursor.y + row.height);
          data.doc.line(data.cursor.x - data.table.width, data.cursor.y + row.height, data.cursor.x, data.cursor.y + row.height);

          ,
          drawHeaderRow: (head, data) =>
          //---------------------------------------
          // Write the line at the bottom of header
          //---------------------------------------
          data.doc.line(data.cursor.x, data.cursor.y + head.height, data.cursor.x + data.table.width, data.cursor.y + head.height);

          );


          Here you may found other elements for paint them in pdf.
          jsPdf docs
          StackBlitz







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 22 at 8:28

























          answered Mar 22 at 6:08









          IvanesIvanes

          1507




          1507












          • Thanks for response, but i dont need that middle lines from the headers

            – Bhrungarajni
            Mar 22 at 6:44











          • @Bhrungarajni updated anwser with line painting

            – Ivanes
            Mar 22 at 8:10











          • ya thank you, but the data will come dynamically so we cant predict these will be the properties and al

            – Bhrungarajni
            Mar 22 at 9:04











          • @Bhrungarajni As you can see, I add lines based not on the static coordinates, but on the coordinates of the cells that were generated based on the data. I define these cells by their unique field (inner text), if the set of basic data in the table changes, but the cells with these unique fields remain, the lines will be drawn where necessary automatically

            – Ivanes
            Mar 22 at 9:09











          • no no thats correct, i have edited my stackblitz with your code, in that i removed table border, can you pls help me to get a border above the header same as in below header.

            – Bhrungarajni
            Mar 22 at 9:15

















          • Thanks for response, but i dont need that middle lines from the headers

            – Bhrungarajni
            Mar 22 at 6:44











          • @Bhrungarajni updated anwser with line painting

            – Ivanes
            Mar 22 at 8:10











          • ya thank you, but the data will come dynamically so we cant predict these will be the properties and al

            – Bhrungarajni
            Mar 22 at 9:04











          • @Bhrungarajni As you can see, I add lines based not on the static coordinates, but on the coordinates of the cells that were generated based on the data. I define these cells by their unique field (inner text), if the set of basic data in the table changes, but the cells with these unique fields remain, the lines will be drawn where necessary automatically

            – Ivanes
            Mar 22 at 9:09











          • no no thats correct, i have edited my stackblitz with your code, in that i removed table border, can you pls help me to get a border above the header same as in below header.

            – Bhrungarajni
            Mar 22 at 9:15
















          Thanks for response, but i dont need that middle lines from the headers

          – Bhrungarajni
          Mar 22 at 6:44





          Thanks for response, but i dont need that middle lines from the headers

          – Bhrungarajni
          Mar 22 at 6:44













          @Bhrungarajni updated anwser with line painting

          – Ivanes
          Mar 22 at 8:10





          @Bhrungarajni updated anwser with line painting

          – Ivanes
          Mar 22 at 8:10













          ya thank you, but the data will come dynamically so we cant predict these will be the properties and al

          – Bhrungarajni
          Mar 22 at 9:04





          ya thank you, but the data will come dynamically so we cant predict these will be the properties and al

          – Bhrungarajni
          Mar 22 at 9:04













          @Bhrungarajni As you can see, I add lines based not on the static coordinates, but on the coordinates of the cells that were generated based on the data. I define these cells by their unique field (inner text), if the set of basic data in the table changes, but the cells with these unique fields remain, the lines will be drawn where necessary automatically

          – Ivanes
          Mar 22 at 9:09





          @Bhrungarajni As you can see, I add lines based not on the static coordinates, but on the coordinates of the cells that were generated based on the data. I define these cells by their unique field (inner text), if the set of basic data in the table changes, but the cells with these unique fields remain, the lines will be drawn where necessary automatically

          – Ivanes
          Mar 22 at 9:09













          no no thats correct, i have edited my stackblitz with your code, in that i removed table border, can you pls help me to get a border above the header same as in below header.

          – Bhrungarajni
          Mar 22 at 9:15





          no no thats correct, i have edited my stackblitz with your code, in that i removed table border, can you pls help me to get a border above the header same as in below header.

          – Bhrungarajni
          Mar 22 at 9:15



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55293032%2fhow-to-give-borders-to-jspdf-autotable-content-generated-dynamically-as-in-templ%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript