Forum Discussion
Print ANYTHING in StoryLine
By adding a new tab in the player properties panel and assigning it to execute the "window.print();" JavaScript, you can allow your participants to print any/every slide in your StoryLine projects including "Notes" or "Certificate" slides! No need to create a complex JavaScript course certificate solution, simply build a beautiful slide and let your users print it directly from the StoryLine player!
For SL 3 and 360 users, you can also move, reformat, hide, and reveal the button so you can take control over what users can print.
I've included the screen shots I used in the video in the attached Word document along with the JavaScript code snippets and an SL3 .story file.
- onEnterFrameCommunity Member
There really are not any 'slides' until they are loaded into the player. And even if you did load them all... at what point in each slide's timeline would you want to print it? Often devs animate the content onto the slide so if you printed the slide at 0 seconds it might be blank.
- onEnterFrameCommunity Member
I have been working on a new method to print ONLY the slide for CoursePortfolios. Give this a try and let me know what sort of success you have please?
var _0x6d8d=["\x68\x65\x6C\x70\x65\x72\x73\x2F\x73\x6C\x69\x64\x65\x54\x68\x75\x6D\x62","\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x67\x66\x6F\x72\x63\x65\x22\x20\x20\x77\x69\x64\x74\x68\x3D\x22\x37\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x35\x34\x30\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E","\x61\x70\x70\x65\x6E\x64","\x62\x6F\x64\x79","\x63\x6F\x6E\x74\x65\x6E\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74","\x63\x6F\x6E\x74\x65\x6E\x74\x57\x69\x6E\x64\x6F\x77","\x68\x74\x6D\x6C","\x67\x65\x6E\x65\x72\x61\x74\x65","\x77\x72\x69\x74\x65","\x63\x6C\x6F\x73\x65","\x70\x72\x69\x6E\x74","\x67\x65\x74","\x23\x67\x66\x6F\x72\x63\x65","\x72\x65\x6D\x6F\x76\x65"];var kingsley=require(_0x6d8d[0]);var hldr=$(_0x6d8d[1]);$(_0x6d8d[3])[_0x6d8d[2]](hldr);var fd=hldr[0][_0x6d8d[4]]|| hldr[0][_0x6d8d[6]][_0x6d8d[5]];fd[_0x6d8d[9]](kingsley[_0x6d8d[8]]()[_0x6d8d[7]]);fd[_0x6d8d[10]]();setTimeout(function(){$(_0x6d8d[13])[_0x6d8d[12]](0)[_0x6d8d[6]][_0x6d8d[11]]();$(_0x6d8d[13])[_0x6d8d[14]]()},100)
- DiarmaidCollinsCommunity Member
Hi James. I was wondering if you could break this code down for me? I don't seem to recognise it as javascript and was wondering how it functions. Apologies for being a dunce.
- OwenHoltSuper Hero
@ James your code is no longer working in current version of 360. 😔
- onEnterFrameCommunity Member
Nice!
- VictorMadisonCommunity Member
Thanks Owen for your work on this option. However, I have a client who uses IE as the corporate browser and runs my SL3 CBT in the local (CD) mode. I have tried everything, including this method, to print a certificate at the end of my course. When I say everything, I have literally tried every solution posted in these eLearning Heroes postings (hours of testing).
I have only had fair results using the simple java script "window.print ()" command. It prints the screen but the certificate is chopped off on the right side since the printout is in portrait mode (the same results occur when the printer is set for landscape). I may just have to delete the printing option for the certificate. I have spent too much time trying to find a solution that works in IE.
- DougKipta-fa001Community Member
Same problem as you. But what i think is happening is that the popup that gives a preview doesn't work in IE, chrome as a popup that seems to work. I'm talking print diaglog popup. I'm finding IE is shiat and haven't found a workaround?
- DougKipta-fa001Community Member
Hi Owen, This is awesome. Works great in Chrome. Why does it give an error when using IE and what is the workaround for that? Cheers, Doug
- JeffreyRileyCommunity Member
I have found that the IE and Edge browsers are the worst for almost everything except just browsing the Internet. I have only been able to get the print to work with Chrome or FireFox.
- onEnterFrameCommunity Member
@doug, @jeffrey,
Are you having issues with Owen's original code or the solution I posted. (the one we are using for CoursePortfolios.com).
Ours seems to work in IE, Edge, Chrome, and Firefox. Please let me know if it is not working for you.
- OwenHoltSuper Hero
The code James posted is pretty $%^& slick! (Pardon the expletives...)
- DougKipta-fa001Community Member
Did you try it in internet explorer. Would be slicker if works in all browsers. Unless someone has figured that out. Sad face.
Sent from my iPhone
- PhilMayorSuper Hero
When I think I am getting better at using javascript James posts something like that ;-)
Works fine (more than fine) in Safari on the Mac
- OwenHoltSuper Hero
I know, right?
- OwenHoltSuper Hero
I've tried it in IE9, Edge, and Chrome. Additionally, James has tested it in Firefox. However, no one can ever guarantee that everyone's browser settings and deployment environments will be exactly the same so one person's testing does not another person's success guarantee. Still, this is probably the closest I've seen... until Articulate changes coding or the next wave of browser version updates.