Forum Discussion
Launching PDFs/Hyperlinks from a Course
Here's a very brief demonstration of what I was suggesting:
In this simple example, you have a screen and you want the learner to open some notes, read the notes (in this case a brief description of a Pareto Curve) and then download the notes as a pdf before they move to the next screen. ..
...PLUS, you would like to do this without opening the pdf in a new browser window (i.e. as a web object) because once you do that the learner gets confused because the new window overlays the Storyline window.
So, the way it works is:
(a) the notes you want to show and download are put into a pdf file "Notestodownload.pdf"
(b) you put the same content in a Storyline screen which you then open as a lightbox when the learner clicks a button on the appropriate screen
(c) in the lightbox you have a button "Download" which, when clicked, executes a short JavaScript routine that 1. opens the "Notestodownload.pdf" 2. reads the contents of the pdf into a binary byte array 3. uses the byte array to create a new pdf file "Document1.pdf" 4. downloads the new pdf as a binary ('blob') file.
When the learner clicks the download button they see a message from the browser asking them if they want to open or download the file. They can save the file with the name of their own choosing....
OK. the JavaScript is more than a couple of lines - but it's fairly straightforward.
NOTE: The JavaScript code also relies on the fact that you have loaded the file "Notestodownload.pdf" into the root folder (i.e. the folder with the story,html file in (or the lmsindex.html file in the case of a SCORM version loaded to an LMS). So this means after you have published the course as a SCORM Package, you unzip the zip file, copy the pdf file to the right folder, re-zip the package, and load the course to the LMS.