Forum Discussion
Print ANYTHING in StoryLine
I hope my unsophisticated (naïve ?) solution for the modern player is helpful... I used Owen's simple JavaScript with Christian's super helpful addition [document.body.style.zoom = .7; window.print();]. Then I added a layer with shapes to cover the onscreen print button. I triggered the cover layer to appear before the JavaScript and then to go away after 1 second. That lets me print what I want with the print button hidden - and I can leave the print button in a familiar place for the learner.
document.body.style.zoom = .7;
window.print();
- VictorMadison4 years agoCommunity Member
Sherri, your java script works great for printing my certificates. However, when I return to the lesson after the printout, the screen is reduced to 70%. So I just added another line to return the display to normal:
document.body.style.zoom = .7;
window.print();
document.body.style.zoom = 1.0;
Thanks,
-Vic
- SherriSagers-ca4 years agoCommunity Member
Thanks Vic! I'm going to update my entry above to include your addition! I love that it's had so many contributors!
- SherriSagers-ca4 years agoCommunity Member
Thanks to Victor Madison for this addition... for those who might have issues with the screen not adjusting correctly:
...when I return to the lesson after the printout, the screen is reduced to 70%. So I just added another line to return the display to normal:
document.body.style.zoom = .7;
window.print();
document.body.style.zoom = 1.0;
- TanudjaGibson-a4 years agoCommunity Member
Hi Sheri,
I'm new to this javascript stuff. Please would you be able to provide the total code, for use with Modern Player, with all the code additions from this post - so I can just copy and paste it in? I have no idea how to construct code or add extra lines to what's there. I won't be customising so will just be using the window.print(); code?. I notice this code prints the Player as well. Is there any code to just print just the slide content, in Modern Player? Many many thanks
- SherriSagers14 years agoCommunity Member
Hi Tanudja! This is all the code you should need. I actually only used the first 2 lines in my birthday card example above and it worked fine for me, but Victor found that he needed the 3rd line in order to return his display to normal after printing. Remember that because this code that has to be executed, you won't be able to see it in action until after you publish. Good luck!
document.body.style.zoom = .7;
window.print();
document.body.style.zoom = 1.0;