Forum Discussion
Creating downloadable pdf files in Storyline - an update on earlier methods
š³šš¾šš¾ ššŗšš¾ š»š¾š¾š ššŗšš š¾šš¼š¾š š š¾šš ššššš ššš¾š ššš¾ šš¾šŗšš šš š¼šš¾šŗšššš šš½šæ šæšš š¾š š»š ššššš š©šŗššŗš²š¼šššš šæššš šššššš š²ššššš ššš¾ (š¾.š. Saving Storyline Variables to a PDF - Articulate Storyline Discussions - E-Learning Heroes) šŗšš½ šØ ššŗšš¾ ššŗš½ šš¾š š šæššš ššŗšš šš¾ššš¾š šš šššš šššš¾ ššš¾š šØ ššŗš ššššššŗš š š šššššš šš šæššššš¾ šš ššš šæšš šššš¾š šæ.
š¬ššš ššæ ššš¾ šŗšššš¼š š¾š (š ššš¾ ššš¾ ššš¾ šŗš»ššš¾) šŗšš¾ šæšŗššš š šš š½ ššš šŗšš½ šŗš½ššš¼šŗšš¾ ššššš ššš¾ š©šŗššŗš²š¼šššš š¼šš½š¾ š šš»ššŗšš "šššÆš½šæ". š ššššš¼šŗš šŗšššššŗš¼š šššš š½ š»š¾ šš š¼šŗššššš¾ šššš š š¾šŗššš¾š'š ššššš ššššš šš¾šš š¾šššš ššŗšššŗš»š š¾š šš š²ššššš ššš¾ - šŗš ššš¾ š¾šš½ ššæ ššš¾ š¼ššššš¾ ššš ššš¼š šš½š¾ šŗ š»ššššš šššŗš šššššš¾šš šššš¾ š©šŗššŗš²š¼šššš šššš¼š šššš š½ ššš¾š šš¾šššš¾šš¾ ššš¾ š²ššššš ššš¾ ššŗšššŗš»š š¾š, šš¾šŗš½ šš šŗ ššš šš ššš šššŗšš¾ ššæ šŗ šš½šæ šæšš š¾ ššŗšš¾, šššš¾šš ššš¾ šš¾ššššš¾š½ šš¾šš šŗš ššš¾ šŗššššššššŗšš¾ š šŗšš½ š š¼šššš½šššŗšš¾š šš ššš¾ ššŗšš¾, šŗšš½ ššš¾š š¼šŗš š šŗ šæššš¼šššš šš "ššŗšš¾" ššš¾ šš¾ššš ššŗšš š¼šššš š¾šš¾š½ šš½šæ.
š³šš¾ š š¾šŗššš¾š (š½š¾šš¾šš½ššš šš ššš¾šš š»ššššš¾š) šššš š½ š»š¾ ššš¾šš¾ššš¾š½ šššš šŗš šššššš šš 'ššŗšš¾' šš 'š½šššš ššŗš½' ššš¾ šæšš š¾.
š¢šš¾šŗšššš ššš šššš š¾ ššŗšš¾ šš½šæ'š ššŗš š¼šššš šš¼šŗšš¾š½ - š»šš šŗš šš šššššš»š š¾. šØ'šš¾ šš¾šššššŗš š š š½ššš¾ ššŗšš ššš¼š¼š¾šššæšš ššššš¾š¼šš ššššš šššš šŗšššššŗš¼š šæšš š½šššš ššŗš½ššš š¼ššššš¾ šššš¾š, ššššš¾š šš¾ššš šš šš š¼š¾ššššæšš¼šŗšš¾š.
š¦š¼ ššµš š®šŗ š š»š¼š š®š±šš¼š°š®šš¶š»š“ š® š±š¶š³š³š²šæš²š»š š®š½š½šæš¼š®š°šµ?
š¶š¾š š , š ššš¾ ššš¾ šŗšššš¼š š¾š, šššÆš½šæ šš šŗ š šš»ššŗšš šššŗš ššŗš š»š¾š¾š šŗššššš½ šššš¾ šššš¾. šØš š½šš¾š šŗ šššš½ ššš» šŗšš½ ššššššŗšš½š ššæ š©šŗššŗš²š¼šššš ššššššŗššš¾šš šš¾š š šš šš. šØš š¼šŗš š¼šš¾šŗšš¾, šŗšš½ ššŗšš¾ šš½šæ'š šššš šæššš¾. š§ššš¾šš¾š, šŗ šššš¾ šš¾š¼š¾šš š©šŗššŗš²š¼šššš š šš»ššŗšš "šš½šæ-š šš»" ššŗš šŗ š«š®š³ šššš¾ šæššš¼šššššŗš ššš. šØš ššŗšššš¼šš šŗš, šš š¼šŗš
ššš½ššæš š¾ššššššš šš½šæ'š
š¼šš¾šŗšš¾, šæšš š šŗšš½ šæš šŗššš¾š šš½šæ šæšššš
šŗš½š½, šššš¾šš šŗšš½ šš¾šššš¾ ššŗšš¾š šæššš šŗ šš½šæ
...šŗšš½ šŗ šššš š¾ š šš šššš¾.
š³ššš šš¾šŗšš šššŗš ššššš¾šŗš½ ššæ ššŗšššæšš š š ššššššš ššš ššš¾šš¾ ššš šš¾š¾š½ šš šš šŗš¼š¾ ššš¾ šš¾šš šš š¾šŗš¼š ššŗšš¾ ššæ ššš¾ šš½šæ, ššš š¼šŗš ššššš š š½š¾šššš šŗ šš½šæ šæššš, ššŗšš¾ ššš¾ šæšš¾š š½š šŗšš½ ššš¾š ššš¾ ššš¾ šš¾šššš¾šš¾š½ ššŗšššŗš»š š¾š šæššš š²ššššš ššš¾ šš 'šæšš š ' ššš ššš¾ šæššš.
š¶š¾ ššŗšš¾ š»š¾š¾š šŗššŗšš¾ ššæ šš½šæ-š šš» šæšš šššš¾ šššš¾ š»šš šš¾šš¾š šæšššš½ ššš¾ šššš¾ šš š½š šŗššššššš šŗš»ššš šš (ššššš ššš¾ šš š½ ššššššŗššš¾šš' šŗš½šŗšš¾ "ššæ šššš š¼šš½š¾ šš ššššššš š½šš'š ššš šŗšš½ šæšš šš"). š®šš¾š ššš¾ š¢šššššššŗš š»šš¾šŗš šš-š»š¾ššš¾š¾š š¼š¾š š¾š»ššŗššššš (šŗšš½ šššš»šŗš»š š šæšš¾š š¾š½ š»š ššš ššš¼š šæš¾ššššš¾ šššššš šš šš¼š¼šŗššššš) šš¾ šš¾šš¾ šŗš»š š¾ šš šš¾š šŗ šš¾š (š»šš šš¾šš š»šŗššš¼) š½š¾šššššššŗšššš ššššššš šššš¼š š¼šŗš š»š¾ ššš¾šš¾š½ šš¾šš¾:
https://demo5.profilelearning.com
š®š, šššš ššš'š šŗ šš¾šš ššššš¾ššššš¾ š½š¾šš - š»šš šš¾ šŗšš¾ ššššššš šš šš - šŗšš½ ššš š ššš»š ššš ššš šš šššš¾š¾ šššš¾ šŗšššš¼š š¾š š¾ššš šŗššššš šŗ š»šš šššš¾ šŗš»ššš šššš š¼šš½š¾ š šš»ššŗšš šŗšš½ šŗš šš šŗš»ššš 'ššš½š¾šš š©šŗššŗš²š¼šššš'
šššš šš¼ ššµš²š šš¼ššæ š®š½š½š²šš¶šš² š® š¹š¶ššš¹š² š³ššæššµš²šæ šš¼ šÆš¼š¼šøšŗš®šæšø ššµš¶š š½š¼šš - šš² š®š¹šš¼ šµš®šš² ššµš² š®šÆš¼šš² š±š²šŗš¼š»šššæš®šš¶š¼š» šš¼šæšøš¶š»š“ š¶š» š„šš¦š....
- ToddVillariCommunity Member
Thanks for the code. I used it to create 10 downloadable PDFs within a single Storyline each with 2 to 5 prompt responses. This worked flawlessly with multiple pages too. Much appreciated.
- HeatherVogt-d32Community Member
Todd,
Which code did you use? I have no idea where to start with any of this, so working code is a great place to begin!
- JohnCooper-be3cCommunity Member
Hi Virinela
Downloadable JavaScript Libraries can be either open source or closed source (proprietary). You are right to ask the question and I should have made it clear when I suggested this method of creating downloadbale pdf files. Rest assured that pdf-lib is made available under one of the most common open source licences - MIT. Under this licence for pdf-lib the following conditions apply:
Copyright (c) 2019 Andrew Dillon
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
Since I was not distributing the code - simply including a call to download it from a common library it is not strictly necessary for me to include the copyright notice - but I feel better now I have drawn attention to the notice and I will add the appropriate copyright notice to the comments in my code in future when I use such libraries.
But it is a good question - and thanks for asking it. :)
- JohnCooper-be3cCommunity Member
Hi Virineia
Sorry I misunderstood your question I thought you were asking if you were breaching any rules on usage by using the libraries rather than was there a risk to your own data. Again a very good question...
Obvioulsy, there is always a risk if you introduce third-party code into your application that it might open up some security vulnerabilities. As with all software, it is best to keep it up to date and to check regulary if any vulnerabilities have been reported. Plus the usual advice on anti-virus software and regular backups also apply.
That said, JavaScript is a pretty safe language to use when running under a browser. The browser will not allow it to perform tasks like accessing the local file system (CORS standards) or perform system tasks.
As to the pdf file that you create if you use a JavasCript library - like pdf-lib - it will be under the users control where they save it and it will then be protected by the local system file protection rules. So it may be necessary to think about the use of shared libraries if the file contains sensitive date. Also, with pdf-lib, the pdf file starts life as a pdf 'form' template. Make sure, once the learner has completed the form that you use a 'Flatten' Javascript command to turn the pdf form into a standard pdf.
It is also possible to create the pdf file as read-only and also to password protect it using pdf-lib. You should also be able to encrypt it - but I would need to check that.
If you are really worried about the data then you might want to consider creating the pdf file on a server, rather than the users local system. This would give you more options to protect it.
Hope that helps.
- JackieCompton-7Community Member
The amount of info in this thread is incredible! I've been able to make this work for the most part, but I'm running into a snag when it comes to my PDF. I designed a PDF in Canva and configured the form fields in Adobe Acrobat Pro, but when it comes to generating the PDF using JavaScript in Storyline, nothing happens. I tried altering John's original template PDF with the form fields I was using in my Canva-created PDF, and it works fine; however, that was only with copying the form fields. I then tried to copy all of the content from my Canva-created PDF into John's template PDF, and once again, the PDF isn't generating from Storyline. Anyone have any ideas? I'm thinking it's probably the Canva PDF, but I'm not sure why. I'm not getting any error messages to help diagnose it further.
- JackieCompton-7Community Member
I figured it out! It was the form fields I created. The form fields had Rich Text Formatting enabled, which prevented the JavaScript from working properly.
- FredGoodCommunity Member
Jackie, you're a hero for providing this closure! Thank you! :)
- NedimCommunity Member
Thank you for sharing, John! I've been searching for something like this for my client, and it's wonderful to discover that this method, along with this JavaScript library, offers even more possibilities. I've successfully implemented it as a web object triggered by a button click, allowing me to fetch and save the PDF template. This enables me to publish it to Review 360 for my client's review and feedback. Additionally, I've made efforts to avoid duplicating the PDF template to the root directory each time I publish the course. By keeping it within the web object folder, the PDF template remains easily accessible at all times. I just started following your LinkedIn company page.
- JohnCooper-be3cCommunity Member
Hi Nedim
I'm glad this discussion was of use. I have also used the same approach and JavaScript library to provide downloadbale notes in RISE. This is done by using Storyline blocks for the text entry and then storing the variables in local browser storage until the end of the course when another Storyline block populates the notes document from the pdf template.
I had a request on another thread to run a workshop on this for RISE developers and there are two FREE on-line workshops running next Tuesday (26th March) which will walk through an example of this. If anyone is interested in attending, send me a message and I can provide a link.
- JackieCompton-7Community Member
Hi John, I'm interested in attending!
- NedimCommunity Member
Hi John. I'm interested. Hope I'll get some spare time to attend it.
- HeatherVogt-d32Community Member
Hello, John! I see the workshops have passed; do you know if there's a recording of the workshop?
Also, is this just a solution for Rise or can it be applied to Storyline 360? Frankly, I have *zero* Javascript experience so this might be out of my league entirely.
Hi Heather,
Feel free to open a case with our support team here if you'd like to request recordings of trainings or webinars that you may have missed. I'll let John help you with the Javascript side of things!
- JohnCooper-be3cCommunity Member
Hi Heather
The workshops were a one-off and were specific to creating downloadable notes in RISE using Javascript and local browser storage. They weren't recorded because the workshop usedseveral short video clips demonstrating the key steps in the approach. I am currently converting these into a single asynchronous elearning that covers the whole process and step-by-step instructions, which I will make available on our site.
BUT, if your interest is just to do this in Storyline, I posted details and a short demo of this earlier in this thread. It looks a bit daunting if JavaScript isn't your thing - but it is, actually, fairly simple code.
If you download the sample Storyline file and the pdf template in this post, I would be happy to help go through that example.
The nice thing about this approach is that you, firstly, design your handount as a pdf template inserting fields where you want the learner's input to go - no JavaScript at all involved in that bit! You then just copy the code from the Storyline sample and it should be reasonably simple to work out where your field names need to go.
But, as I say - happy to assist, if I can.
- HeatherVogt-d32Community Member
Hello, John! I appreciate that. I'll take a peek and reach out. I truly appreciate you.
Also, I tried to register on your site but it said my verification had failed. Any idea what that's about? Thanks for any insight!
- SaraBean-da7305Community Member
@John Cooper, you are a hero for this thread! And all of those who added knowledge and expertise, kudos! This is one of the best threads I've seen on Articulate ELH and I will be coming back over and over until I've mastered it. Perfect timing, I'm creating a course where a customized PDF is a must. Love this community!
- JohnCooper-be3cCommunity Member
Just by way of an update. There is now a FREE elearning workshop available on our website that takes you through step-by-step how to create downloadable notes or a learning journal from a Storyline Course. the examples used and full JavaScript code files can be downloaded during the course.
Course Catalogue (profilelearning.com)
You will need to register and you will receive an email for verification purposes but the workshop is free and uninterrupted by advertising!
We will shortly release two further workshops showing how the same task can be accomplished in a RISE course (a) using local browser storage and (b) using SCORM 2004 data storage to hold the text variables required for the journal.
- PhilMayorSuper Hero
John I applaud you for doing this and offering it for free
Sent from my iPhone