Forum Discussion

KateMackenzie's avatar
KateMackenzie
Community Member
5 years ago

Re: Storyline 360 - Generating a PDF Certificate using JavaScript

function createPDF() {
var D1 = '';
var D2 = '';

var player = parent.GetPlayer();

D1 = player.GetVar("firstname");
D2 = player.GetVar("lastname");
//var docDefinition = { content: 'This is an sample PDF printed with pdfMake for '+name+"!" };
var docDefinition = {

content: [

{
table: {
heights: [100,100,100,100],
widths: [500],
headerRows: 3,
body: [
['Certificate of completion'],
[HOW THE HELL DO I GET THE VARIABLES HERE?],
['completed the eSafety Early Years module'],
['We SAY and SHARE with technology'],
]
},
style: 'header',
alignment: 'center',
layout: 'noBorders'
},

No RepliesBe the first to reply