Hi, I would like to add a button that would allow the user to print the page. It seems like the easiest way would be to add a trigger to a button to execute javascript. Unfortunately, I know nothing of javascript. Can someone help me out with what need to goes into that script box?
This in formation was great. I too know nothing aout Java scripts. I used the script and it printed the page. However, the button showed in the print. Is there away that I can put the button on another slide and enter a script to print a particular page or hide the button from printing?
Similar to Omar, I am looking for some code to take the text from the text entry (which is set to a variable (UserNotes) and print just that. Not the screen or any other buttons. Any suggestions or resources? Thanks!
This in formation was great. I too know nothing aout Java scripts. I used the script and it printed the page. However, the button showed in the print. Is there away that I can put the button on another slide and enter a script to print a particular page or hide the button from printing?
On page 1, I had the button link to a new slide with a trigger that says: Execute Javascript when the timeline starts. In the ... button I inputted the JavaScript print command. This avoids having to do anything funky with the Print Screen button. I ended up putting the variables and scoring page on a second slide that was 'printer friendly,' basically I created a new page with my own table.
It'll print the page the moment the user clicks the Print button on page one.
Actually, correction, it printed the previous slide, not sure why. So, I just added a print button at the bottom of this page, simple fix. Doesn't get in the way of the table.
Thanks for the tip on window.print(); It worked for me. How can I get the window to automatically print in landscape orientation? What do I need to add to the JavaScript code?
To the question about not printing the "print me" button, you might try adding a trigger to hide the print button before calling the JavaScript to print the page.
To the question about printing to landscape orientation - unfortunately, the browser interface through JavaScript doesn't offer any controls of the print dialog options. You can ask the browser to print the page but that's about it. There are some tricks you can run if you have some Flash authoring / ActionScript skills and access to Flash but short of that you're stuck either 1) asking the user to change the print settings to landscape or 2) living with the portrait default.
Has anyone come across any problems using this with Chrome/Firefox? It seems to work fine every time through IE but randomly when I click the button the preview will come up blank, and print a blank page for both Chrome and Firefox even though it's the exact same course that is working in IE.
Hi all. Just wondering if anyone else is having trouble using the print script in conjuncton with Firefox browser? Works fine in IE but comes up blank in Firefox. The file is posted to the web.
Hello again. I guess my question may not have been phrased in the best way, seeing as there have been no responses.
Are folks out there using Firefox and having success with the window.print() function from a Storyline course mounted on a website? When I run IE I get my printed page in portrait.
When I run Firefox (on a Windows 7, 64 bit system with the latest version of Flash [also taking away the protected mode] and Java), the page comes out blank.
Any clues about what I might do to make Firefox work for me?
Hi Grant - I have the same setup as you Windows 7, 64 bit and I just created a little SL project that has a button with the javascript to print the page when clicked. It is nothing special but I published and tried running it locally using Firefox and it worked fine.
I tested it on Firefox version 15.0.1 and Firefox version 16.0.2 and it worked fine on both.
You say the course is mounted on a website so I am wondering if it is a firewall issue.
I have uploaded the storyline file that I used. I know it works so try it and see if it works for you. If it doesn't then there is some issue with your browser configuration or your network security.
Unfortunately, no joy on my side with this slide - at least I can go ahead and seek out the cause knowing that someone using a similar system has been successful! That's a great pace to start.
Hi Nancy, not at all a stupid question, but sadly, this is something that I had checked and yes, it is enabled. Still, unable to print the file you were able to print after quite a lot more time wasted.
In case others may have similar problems, what I have learned is that similar problems have been exprienced by others in the past both in Storyline (and this thread is an example) and also with Firefox and all sorts of programs more generally. It has to do with Firefox usually not liking to print windows via flash apparently. In fact, there is a public, unallocated bugfix request (and a whole lot of duplicate requests) for the Firefox team that goes back to 2002! Much teeth gnashing in the Firefox and other forums about this.
My work-around will be simply to warn users that the print feature works in IE but is not guaranteed to work in Firefox. I'll add ablank pdf to the Resources section which they could print out if the auto-print I've set up (and which works in IE) fails them.
Thanks again Nancy for your very kind and prompt support.
I too want to print only the slide. I tried the javascript option, and it works, but I'm getting 2 pages, not just the one with the print button. Thoughts?
I reduced my certificate to the side where I can see the printed and after that my French version of the course is working. However, to the English version, even using the same story file and only changing the text to English, when I print the page, the certificate is being squeezed. :(
I only need to know how to print one slide to have a perfect course. Any ideas to solve this problem?
Though this method isn't supported by Articulate, it might be something you'd like to try for customizing the printed results. Please note that it's for Quizmaker, but this will work for Storyline, as well.
If that doesn't help with the formatting, or isn't what you're trying to do, can you give a little more information about what you'd like to show when printing the results from your course? Or how the text is displaying when you change it to English (try to provide a screenshot, of the changes if you can)?
69 Replies
I too know next to nothing about javascript but I believe if you add the following as a your script it will print the current window:
window.print();
At least is worked for me once...
Yes that should do it.
So Alex, you can create a button in Storyline and then add a trigger using the JavaScript Action.
Click the ... button beside the work Script and add the code there.
You have to publish your coure to see it working. JavaScript does not work in Preview mode.
I just used the JavaScript Action and it worked for me! Thank you so much for sharing this information!
This in formation was great. I too know nothing aout Java scripts. I used the script and it printed the page. However, the button showed in the print. Is there away that I can put the button on another slide and enter a script to print a particular page or hide the button from printing?
Similar to Omar, I am looking for some code to take the text from the text entry (which is set to a variable (UserNotes) and print just that. Not the screen or any other buttons. Any suggestions or resources? Thanks!
Is there any more information on this topic anyone could link to or share? I'm also wondering about printable features within Java Script triggers.
On page 1, I had the button link to a new slide with a trigger that says: Execute Javascript when the timeline starts. In the ... button I inputted the JavaScript print command. This avoids having to do anything funky with the Print Screen button. I ended up putting the variables and scoring page on a second slide that was 'printer friendly,' basically I created a new page with my own table.
It'll print the page the moment the user clicks the Print button on page one.
Actually, correction, it printed the previous slide, not sure why. So, I just added a print button at the bottom of this page, simple fix. Doesn't get in the way of the table.
Thanks for the tip on window.print(); It worked for me. How can I get the window to automatically print in landscape orientation? What do I need to add to the JavaScript code?
To the question about not printing the "print me" button, you might try adding a trigger to hide the print button before calling the JavaScript to print the page.
To the question about printing to landscape orientation - unfortunately, the browser interface through JavaScript doesn't offer any controls of the print dialog options. You can ask the browser to print the page but that's about it. There are some tricks you can run if you have some Flash authoring / ActionScript skills and access to Flash but short of that you're stuck either 1) asking the user to change the print settings to landscape or 2) living with the portrait default.
Has anyone come across any problems using this with Chrome/Firefox? It seems to work fine every time through IE but randomly when I click the button the preview will come up blank, and print a blank page for both Chrome and Firefox even though it's the exact same course that is working in IE.
Tested the print script in IE - works fine.
Fails in Chrome - java-related browser issue?
Hi Jim, I think it is a browser security issue. Where you testing locally or over the internet?
Chrome blocks javascript when running locally.
thanks Nancy - that's the hang on this, works fine when run outside the network on web
Hi all. Just wondering if anyone else is having trouble using the print script in conjuncton with Firefox browser? Works fine in IE but comes up blank in Firefox. The file is posted to the web.
Hello again. I guess my question may not have been phrased in the best way, seeing as there have been no responses.
Are folks out there using Firefox and having success with the window.print() function from a Storyline course mounted on a website? When I run IE I get my printed page in portrait.
When I run Firefox (on a Windows 7, 64 bit system with the latest version of Flash [also taking away the protected mode] and Java), the page comes out blank.
Any clues about what I might do to make Firefox work for me?
Many thanks in anticipation.
Hi Grant - I have the same setup as you Windows 7, 64 bit and I just created a little SL project that has a button with the javascript to print the page when clicked. It is nothing special but I published and tried running it locally using Firefox and it worked fine.
I tested it on Firefox version 15.0.1 and Firefox version 16.0.2 and it worked fine on both.
You say the course is mounted on a website so I am wondering if it is a firewall issue.
I have uploaded the storyline file that I used. I know it works so try it and see if it works for you. If it doesn't then there is some issue with your browser configuration or your network security.
Hello Nancy. Thanks so much for this.
Unfortunately, no joy on my side with this slide - at least I can go ahead and seek out the cause knowing that someone using a similar system has been successful! That's a great pace to start.
This might be a stupid question, but do you have JavaScript enabled in the Firefox options?
Hi Nancy, not at all a stupid question, but sadly, this is something that I had checked and yes, it is enabled. Still, unable to print the file you were able to print after quite a lot more time wasted.
In case others may have similar problems, what I have learned is that similar problems have been exprienced by others in the past both in Storyline (and this thread is an example) and also with Firefox and all sorts of programs more generally. It has to do with Firefox usually not liking to print windows via flash apparently. In fact, there is a public, unallocated bugfix request (and a whole lot of duplicate requests) for the Firefox team that goes back to 2002! Much teeth gnashing in the Firefox and other forums about this.
My work-around will be simply to warn users that the print feature works in IE but is not guaranteed to work in Firefox. I'll add ablank pdf to the Resources section which they could print out if the auto-print I've set up (and which works in IE) fails them.
Thanks again Nancy for your very kind and prompt support.
Can you use this functionality to just print the slide and not the screen? Or maybe just the slide notes? I dont want a whole screen 'dump'. thanks
I too want to print only the slide. I tried the javascript option, and it works, but I'm getting 2 pages, not just the one with the print button. Thoughts?
Anyone know how to make the slide (stretch) fit to one page when printed? It's only using half of the page.
I was having the same problem Caji.
I reduced my certificate to the side where I can see the printed and after that my French version of the course is working. However, to the English version, even using the same story file and only changing the text to English, when I print the page, the certificate is being squeezed. :(
I only need to know how to print one slide to have a perfect course. Any ideas to solve this problem?
PS: My LMS works only on IE browser 7, 8 and 9.
Hi Val,
Though this method isn't supported by Articulate, it might be something you'd like to try for customizing the printed results. Please note that it's for Quizmaker, but this will work for Storyline, as well.
If that doesn't help with the formatting, or isn't what you're trying to do, can you give a little more information about what you'd like to show when printing the results from your course? Or how the text is displaying when you change it to English (try to provide a screenshot, of the changes if you can)?
Thanks!
Christine