Forum Discussion
Storyline 2 Example - Generating a PDF Certificate for users who successfully complete a quiz
Hi all,
I've been experimenting with a JavaScript PDF library (pdfmake) to generate PDF certificates client side for learners who have successfully completed a quiz in Storyline 2.
You can see an example at http://rlowry.github.io/certificate/story.html
The 1st slide of the example provides a brief overview of how this works. I've tested this successfully in Internet Explorer, Chrome, Firefox, Chrome on Android and Safari on iOS.
I've attached a simple source file that contains a basic .story file as well as a folder (certificate) that includes the required HTML and JavaScript that needs to be included within a web object within the project. Feel free to have a look and re-use if it's useful.
The generated PDF certificate is very basic at the moment, you'll need to refer to the pdfmake documentation to update the design.
UPDATE: Originally this example only worked with the HTML5 output. I've tweaked it so it now works with the Flash output as well. I've updated the attached files to reflect this change.
UPDATE 2: I've updated the attached source files so they now use the latest version of pdfmake (v0.1.27).
Cheers,
Ryan
152 Replies
- StephanieSuper Hero
Hi Ryan. Do you know of a way to email the generated PDF as an attachment client side?
- TatianeZFCommunity Member
- SteveCole-eb2f6Community Member
Does anyone know if this works with Storyline 360?
- JoshuaCooperDarCommunity Member
Thanks for the info!
I'm following your example and everything is working great.
However, when I add custom fonts to the project the PDF fails to print. I'm following all the pdfmake instructions on Github (recompiling the fonts file etc) but haven't been able to track down the bug. The one clue I found was from an old message board where a user had a similar problem and said it was due to a problem with Articulate.
Has anyone else encountered this problem? Were you able to overcome it? Any advice? Or can some one share a working example or template I can follow?
Thanks!
- janisstarsCommunity Member
- DougDewanCommunity Member
H Ryan, I keep getting a 404 error, file not found when I go to your example link.
- RyanLowryCommunity Member
Hi Doug, this is quite an old post and I've since deleted the example files. There's a slightly more recent post for Storyline 360 here that includes an example link: Storyline 360 - Generating a PDF Certificate using JavaScript - Articulate Storyline Discussions - E-Learning Heroes
- DougDewanCommunity Member
Thank you, I eventually did stumble upon the newer one. 😊
Thanks for sharing
- MariaCSStaff
Hi, Doug.
I'm happy to hear you found what you were looking for!
I just wanted to add a quick note: it looks like your signature with contact information came through when you replied via email. You can remove it by clicking 'Edit' below your response. Here's a quick Peek 360 video if you need help.
Related Content
- 3 months ago
- 9 months ago