Forum Discussion
Example files: Generating a certificate from Storyline
This example demonstrates how you can take user input and generate a certificate for printing. Any Storyline variable or score can be used to generate the output. The file and file add-ins are both simple and straight forward. This will only work in the Flash based output. This will not work in the iOS output or HTML5.
To replicate this on your end:
1) Modify the story file to your liking.
2) Extract the add-in zip file above (certificate.html and certificateBG.gif)
3) Copy these two files into your published output directory. You'll need to do this each time you publish.
This is a really basic example. You really can do quite a bit with this including adding a print button, extra fields, collecting values from the LMS like the user's first and last name.
** I noticed a bug when playing with this file setup. I initially thought I would be able to include the certificate files as resources to avoid copy / paste surgery after publish. Unfortunately, Storyline mangled the HTML file on publish. Will be submitting this as a bug.
236 Replies
- REENAMITTALCommunity Member
Hi,
certificate is also print by the java script but it is only work in html5(all browser). and in simple html it is work in i.e browser
Please reply if you can print certificate in all browser in simple html.
Thanks
- SusanStewart1Community Member
Daniel David said:
Daniel, the dropbox link for this guide is "invalid". Can you please relink? Thanks so much!Susan
- StephenConeCommunity Member
Mike Tschirn said:
I have tried everything here, to the letter. Our LMS server is not up and running yet, so I am only trying locally. There is no way that the text appears on the certificate, no matter what I try.
Hi Mike,
I apologize for not seeing this message when I was scanning this thread earlier, but I did want to pass this along. One tool that I find to be invaluable is the ADL Test Suite. You can use the ADL Test Suite to perform a local SCO test. The Test Suite will mimic a SCORM compliant LMS and you can modify settings such as the user-name, etc prior to launching the SCO. Just make sure you point to the index_lms file before launching the test.
It's usually the first tool I reach for when I need to test or verify SCORM functionality/interactions regardless of the development tool that was used to create the courses.
- felicityburkeCommunity Member
Hello,
Forgive me if I am repeating a problem, but could someone check my javascripts below? This is on a slide trigger in Storyline Articulate to execute when the timeline starts.
var currentTime = new Date();
var month = currentTime.getMonth() + 1;
var day = currentTime.getDate();
var year = currentTime.getFullYear();
var dateString=day + "/" + month + "/" + year;
var player = GetPlayer();
player.SetVar("SystemDate",dateString);I have a print button on my certificate with this trigger-execute javascript when user clicks button
"window.print()"
within the certificate I have name variable which works
%FirstName% %LastName%
and date variable which works
%SystemDate%
The certificate looks fine, the autofills work - it will just NOT PRINT from my print button in the LMS or elsewhere.
Is there a quick fix I am missing???
- felicityburkeCommunity Member
Have solved the print problem, was an error with notation.
Hi Felicity! Glad to hear that you figured it out, thanks for updating us!
- HowiePearsonCommunity Member
Steve Flowers said:
Hi Cynthia -
Traditionally, you'd need a server side application to generate a PDF. But there's a way to do that with JavaScript. If I get some time this week I'll post an example.
Did you find a way of doing this Steve? - FredJanssensCommunity Member
Hi Steve,
I would also appreciate your input here. Printing a webpage is just not good enough.
Many thanks,
Fred
- JenniferAnozieCommunity Member
I also would like some help with getting the certificate to work in LMS without server option. Any help appreciated.
- SteveFlowersCommunity Member
I gave a couple of frameworks as well as a PDF native method a spin. One of them didn't work consistently between browsers despite the documentation indicating support. The other worked but I didn't have time to dig into it. I don't recommend the JavaScript frameworks due to the complexity. The PDF method is great but there's a drawback that requires user intervention to turn off the built-in Chrome PDF viewer if it's installed and the user is opening the presentation in Chrome.
The one that didn't work in the latest version on their demo site.
http://parall.ax/products/jspdf
The one that worked.
http://bytescout.com/products/developer/pdfgeneratorsdkjs/index.html
Both of these would require some javascript-fu to make the printable certificate.And I suspect there will be situations where it might not work since browsers all play by their own rules.
The other thing I was looking at was populating a pre-built PDF with fields / variables or fed via a querystring. This works well when it works and lets you be as decorative as you want to be with the certificate.
http://www.halnesbitt.com/pages/pdfqs.php
This works great. Except you need to disable the PDF viewer in Chrome to make it work in chrome://plugins/
Of all of these, I think the simplest and best option is the last option: Using a PDF with dynamic fields updated via querystring.
- SarahNewman1Community Member
Hi Steve,
I realize it's been over 3 years since you posted this and you may not be following this thread anymore, so I'll also send you an inbox message. I just thought it might be useful for other people to see your answer here.
I figured out how to add the javascript to the PDF I built, but I'm not sure it's all set up correctly. The site you referenced doesn't really have instructions on how to use the javascript, other than to explain how to insert it in the Document Javascripts window. What would you do if you have more than one dynamic field that you want to pull data into? How do you get those fields to pull information from the published Storyline course? Do you just have to name the text entry fields using the same naming conventions as the text fields in the PDF?
If you're able to give me some assistance with this, I would really appreciate it!
Related Content
- 3 months ago