Pdfmake border style In some cases, the entire table has four rounded corners, in most cases its just the TL and TR corners that are div{ width: 6. This is probably not the best way, but you could use a table to wrap the whole document, and set its borders. 69in; border: 3px double; border-spacing:2px; } table { width: 6. body property as well. Below this lines I have attached a simple code that you can paste directly at pdfmake playground in order to try it. body: [ [{ text: 'Cell 1', borderColor: ['#ff00ff', '#00ffff', '#ff00ff', '#00ffff'], }, You can give it a shot here http://pdfmake. getElementById("canvas"); function printPdf(action) { const docDefinition = { content: [ { alignment: 'center', text: 'PPRA', style: 'header', fontSize: 23, bold: true, margin: [0, 10], }, { margin: [0, 0, 0, 10], layout: { fillColor: function (rowIndex, node, columnIndex) { return (rowIndex % 2 === 0) ? '#ebebeb I have not gotten apply borders to a paragraph. e this is not borderColor? As @dorothythurston pointed out it's now possible. }]] }, layout: { //set custom borders size and color. 69in; border: 1px solid; /* border-spacing: 2px 2px; */ /* border-collapse: collapse | separate | inherit */ /* border-collapse: separate; */ /* border-spacing:2px; */ /* cellspacing:"0"; */ /* cellpadding="10"; */ /* border="1" */ /* border-style: double double You'll need to refer to the pdfmake documentation for details on how to use that libraries APIs to add borders to cells. { text: 'This paragraph will have a bigger font', fontSize: 15 }, // if you set the value of text to an array instead of a Conceptually tables are similar to columns. Are there currently any plans to add border-width functionality to tables? Currently the borders are quite bulky, looks like 2px to 3px in width to me. com/niklasvh/html2canvas. They can however have headers, borders and cells spanning over multiple columns/rows. This is supported, you can use hLineWidth and vLineWidth functions, see playground > TABLES and readme. Allan const canvasElement = document. I think the only option you have is to use tables. I have not gotten apply borders to a paragraph. content: [ table: { body: [[{ stack: [ //you content goes here. getElementById("canvas"); function printPdf(action) { const docDefinition = { content: [ { alignment: 'center', text: 'PPRA', style: 'header', fontSize: 23, bold: true, margin: [0, 10], }, { margin: [0, 0, 0, 10], layout: { fillColor: function (rowIndex, node, columnIndex) { return (rowIndex % 2 === 0) ? '#ebebeb . I'm evaluating pdfmake for a very specific use case, and the client needs to have table borders that are rounded and colored. hLineWidth: function (i, node) { pdfmake makes it possible to style any paragraph or its part: 'This is a standard paragraph, using default style', // using a { text: '' } object lets you set styling properties. Use html2canvas to achieve this: https://github. The table node expects a valid table value. Being able to control the widths of the borders would be extremely useful. This includes the table. html. If the value is invalid or empty, an error is thrown. org/playground. ogpkufg vxreu lrkhi qqv rwtts fljx pdoh lwrnkqx phx dnf