JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://rawgit.com/bpampuch/pdfmake/master/build/pdfmake.min.js"></script>
<script src="https://rawgit.com/bpampuch/pdfmake/master/build/vfs_fonts.js"></script>
JavaScript
var docDefinition = {
content: [
{
columns: [
{ text: 'Column 1',
},
[
{
text: 'Column 2',
alignment: 'right' // WORKS
},
{
alignment: 'right', // NO EFFECT
table: {
alignment: 'right', // NO EFFECT
body: [
['Date', '07/21/2017' ],
['Representative', 'Test' ]
]
}
}
]
]
}
]
};
pdfMake.createPdf(docDefinition).download();