Mujibur Rehman Ansari
Mujibur Rehman Ansari

Reputation: 663

Line Width of Table in pdfmake.js

I am working on pdfmake.js library for creating pdf. I need some help to change the line width of the table and cells.

My table object is

{
    table: {
        body: [
            [
                {
                    text: gHorse.anglesCount,
                    background: bgfcolor,
                    color: fcolor,
                    border: [ true, true, true, true ],
                    fillColor: ffcolor,
                    alignment: "center",
                    "fontSize": 6
                }
            ]
        ]
    },
    margin: [ -20, 0, 0, 0 ]
}

Upvotes: 2

Views: 9082

Answers (1)

Chanikya
Chanikya

Reputation: 486

If your question is Change the width of the line, my answer is:

content: [
  layout: {
    hLineWidth: function(i, node) {
      return (i === 0 || i === node.table.body.length) ? 0.1 : 0.1;
    },
    vLineWidth: function(i, node) {
      return (i === 0 || i === node.table.widths.length) ? 0.1 : 0.1;
    }
  }
]

Upvotes: 3

Related Questions