Forum Discussion
RyanLowry
7 years agoCommunity Member
Storyline 360 - Generating a PDF Certificate using JavaScript
This example demonstrates how to use the pdfmake JavaScript library to generate PDF certificates in the browser using Storyline 360.
This is a followup to my original post found here. The only cha...
PhilMayor
4 years agoSuper Hero
I would build outside of a table:
{
text: "Certificate of completion",
bold: true,
color: '#3e313e',
fontSize: 14,
bold: true,
alignment: 'left',
// margin: [left, top, right, bottom]
margin: [0, 25, 0, 0]
},
{
text: D1 + " " D2,
bold: true,
color: '#3e313e',
fontSize: 11,
alignment: 'left',
// margin: [left, top, right, bottom]
margin: [0, 5, 0, 0]
},
{
text: "completed the eSafety Early Years module",
//bold: true,
color: '#8B8B8B',
fontSize: 11,
alignment: 'left',
// margin: [left, top, right, bottom]
margin: [0, 0, 0, 0]
},
{
text: "We SAY and SHARE with technology",
bold: true,
color: '#3e313e',
fontSize: 11,
alignment: 'left',
// margin: [left, top, right, bottom]
margin: [0, 10, 0, 0]
},
You way this should work
{
table: {
heights: [100,100,100,100],
widths: [500],
headerRows: 3,
body: [
['Certificate of completion'],
[D1 + " " D2],
['completed the eSafety Early Years module'],
['We SAY and SHARE with technology'],
]
},
style: 'header',
alignment: 'center',
layout: 'noBorders'
},