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
š®š, šššš ššš'š šŗ šš¾šš ššššš¾ššššš¾ š½š¾šš - š»šš šš¾ šŗšš¾ ššššššš šš šš - šŗšš½ ššš š ššš»š ššš ššš šš šššš¾š¾ šššš¾ šŗšššš¼š š¾š š¾ššš šŗššššš šŗ š»šš šššš¾ šŗš»ššš šššš š¼šš½š¾ š šš»ššŗšš šŗšš½ šŗš šš šŗš»ššš 'ššš½š¾šš š©šŗššŗš²š¼šššš'
šššš šš¼ ššµš²š šš¼ššæ š®š½š½š²šš¶šš² š® š¹š¶ššš¹š² š³ššæššµš²šæ šš¼ šÆš¼š¼šøšŗš®šæšø ššµš¶š š½š¼šš - šš² š®š¹šš¼ šµš®šš² ššµš² š®šÆš¼šš² š±š²šŗš¼š»šššæš®šš¶š¼š» šš¼šæšøš¶š»š“ š¶š» š„šš¦š....
- HunterBlakeCommunity Member
I am late to the party, but REALLY want to pull this off. I am working on a Roles and Actions course that will culminate in a "Now go do it!" kind of sheet. I would love for them to be able to download it. I worked the JS into what I needed(Story attached). I have the document(attached as well). I think all of it looks good. I am publishing to a LMS from Storyline and telling it to create a Zip file. I have put my document ALL OVER the zip file to try to make sure it found the document. When I preview it or load it into the LMS and go through it, when I click the button nothing happens.
Now, interesting fact, I loaded your notes demo in the LMS and in preview from Storyline and nothing happens with it either. SO, I am think my code my be good, but it is not finding a file.
I have also changed the URL for the document to our SharePoint site and that does nothing too.
Help me Obi-Won Kenobi!
PS: I added triggers to fill out what you can see on the screen and then I got smart with the things your can't but are on the PDF and added it to the variable default. :)- HunterBlakeCommunity Member
Thank you all for your help. With these changes, I got it to work. You guys ROCK!
- NedimCommunity Member
Replace the following part of the code with the one below. Ensure that const formUrl = ''; exactly matches the name of the PDF file located in the root folder.
var player = GetPlayer(); Role1 = player.GetVar("Role1") ?? ""; Role2 = player.GetVar("Role2") ?? ""; Role3 = player.GetVar("Role3") ?? ""; Role4 = player.GetVar("Role4") ?? ""; Role5 = player.GetVar("Role5") ?? ""; Role6 = player.GetVar("Role6") ?? ""; Role7 = player.GetVar("Role7") ?? ""; Role8 = player.GetVar("Role8") ?? ""; RolePicked1 = player.GetVar("RolePicked1") ?? ""; RolePicked2 = player.GetVar("RolePicked2") ?? ""; RolePicked3 = player.GetVar("RolePicked3") ?? ""; Action1 = player.GetVar("Action1") ?? ""; Action2 = player.GetVar("Action2") ?? ""; Action3 = player.GetVar("Action3") ?? ""; Body = player.GetVar("Body") ?? ""; Mind = player.GetVar("Mind") ?? ""; Spirit = player.GetVar("Spirit") ?? ""; Heart = player.GetVar("Heart") ?? ""; Time1 = player.GetVar("Time1") ?? ""; Time2 = player.GetVar("Time2") ?? ""; Time3 = player.GetVar("Time3") ?? "";
- HunterBlakeCommunity Member
What does this part
?? ""
do?
- ToddVillariCommunity Member
There was a Chrome security update that stopped this from working at my company. That could by why loading the demo to your LMS doesn't work either.
- NedimCommunity Member
Thank you very much, John!
- 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
- SaraBean-da7305Community Member
Hi everyone. I read the notes on this forum extensively (thank you all!) and have talked to John to work out a bug I was having and LOVE this functionality. I'm including a link to a resource that I made for my team showing how to do this. I'm a senior instructional designer at New York Life and often train my team on different bits and bobs of the technical aspects of the job so I put this little thing together for them and held a short training session.
I'll put a link to download the .story and the PDF file in the comments on Review.
https://360.articulate.com/review/content/3b3e97ba-fa9a-4dcd-a378-aba59cde4898/review
- 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
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!
- 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.
- 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!
- NedimCommunity Member
Hi John. I'm interested. Hope I'll get some spare time to attend it.
- JackieCompton-7Community Member
Hi John, I'm interested in attending!
- 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.
- FredGoodCommunity Member
Jackie, you're a hero for providing this closure! Thank you! :)
- 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.