Add border globally in pdf pages
Problem - No clear way to add borders around the pages(including header, body, and footer).
Referred - https://github.com/bpampuch/pdfmake/issues/1396#issuecomment-398047057
Expected - Can add borders around the page in pdf. It would be helpful If we have direct option to set border of the page instead of any hacky way.

Thanks!
var dd = { content: [ { table: { margin:[-40,-40,0], widths: [''], height: [''], bold:'true', body: [ [ //WRITE YOUR CODE FROM HERE //this column is to show how it works { alignment: 'justify', columns: [ { text: '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'
},
{
text:''
}
]
},
]
]
} }
]
}
// playground requires you to assign document definition to a variable called dd
var dd = { content: [ { table: { widths: [''], height: [''], body: [ [ { table: { widths: [''], height: [''], bold:'true', body: [ [
//WRITE YOUR CODE FROM HERE
{ alignment: 'justify', columns: [ { text: '\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'
},
{
text:''
}
]
},
]
]
} } ] ] } }
]
}
//[Page with double border.pdf] //(https://github.com/bpampuch/pdfmake/files/2884559/Page.with.double.border.pdf)
var dd = { background: function (currentPage, pageSize) { return { table: { widths: [pageSize.width - 30], heights: [pageSize.height - 30], body: [['']] }, margin: 10 }; }, }
////This will make a single line border in your pdf docs.///