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
š®š, šššš ššš'š šŗ šš¾šš ššššš¾ššššš¾ š½š¾šš - š»šš šš¾ šŗšš¾ ššššššš šš šš - šŗšš½ ššš š ššš»š ššš ššš šš šššš¾š¾ šššš¾ šŗšššš¼š š¾š š¾ššš šŗššššš šŗ š»šš šššš¾ šŗš»ššš šššš š¼šš½š¾ š šš»ššŗšš šŗšš½ šŗš šš šŗš»ššš 'ššš½š¾šš š©šŗššŗš²š¼šššš'
šššš šš¼ ššµš²š šš¼ššæ š®š½š½š²šš¶šš² š® š¹š¶ššš¹š² š³ššæššµš²šæ šš¼ šÆš¼š¼šøšŗš®šæšø ššµš¶š š½š¼šš - šš² š®š¹šš¼ šµš®šš² ššµš² š®šÆš¼šš² š±š²šŗš¼š»šššæš®šš¶š¼š» šš¼šæšøš¶š»š“ š¶š» š„šš¦š....
90 Replies
- 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.
- 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. :)
- 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!
- SarahNewman-804Community Member
The specifics: I'm working on a tool that allows learners to create a job plan based on the specifics of an installation/jobsite. They answer questions and the course/tool builds out a plan using variables.
I've gotten the full plan to populate on a single slide, and I can print that slide. My preference, though, is to send the plan to a PDF using JavaScript. I publish for Review locally and add the PDF form to the zip file. When I upload it and check the JavaScript by clicking the button it's attached to, I get this error:
AccessDeniedAccess Denied0250CKGY273YHNBTyseYqDxfnAUPrgDNqmEbuhDBQbOcME2zQKaxYYocD9/yxbtXXw0tQWwvUaf27zQymsPEFvA9wYiyRPyf5fikeQ==Any thoughts about why this might be happening? I'm attaching the file in case you are able to look at it. Help would be much appreciated! I'll keep messing with a test file and see if I can figure it out in the meantime. :)
Hello Sarah,
Thanks for sharing a copy of your published output. It would be helpful if you could also share a copy of your Storyline 360 .story project file so members of the community can open your course and review how you have your slides setup.
Based on the error message that you encountered, its possible that the JavaScript code you added is trying to access a file that's in a secure location. You can troubleshoot this by moving your file to a publicly accessible location such as Google Drive or Amazon S3 and updating the JavaScript code to see if this helps.
- JohnCooper-be3cCommunity Member
Just a quick thought. The NotesTemplate.pdf file must be a pdf form file as the JavaScript reads the field information from the file. You could just check the file opens OK as a form... I doubt that is the problem - but worth checking...
- JohnCooper-be3cCommunity Member
Hi Sarah
Sorry you are having difficulties with the demo. I must admit I hadn't tried it in Articulate Review, as I load demos on my own cloud server - but I just tested it and it seemed to work fine. As Phil says, the 403 error indicates there's some problem opening the file rather than the file being missing.
My zip file content looks like this:
with the "Notes Template.pdf" in the root folder with the story,html file.
I'm not sure what else I can suggest.
If the problem persists I can maybe record a short video of my screen as I load the demo to Review. If that would help?
- PhilMayorSuper Hero
403 the resource is missing did it upload?
- SarahNewman-804Community Member
It looks like it uploaded just fine? I did "Upload New Version" with the zip file, which I had already pasted the PDF file into. The note taker opens up just fine, but when I enter text and hit submit, nothing happens.
- PhilMayorSuper Hero
Sorry my mistake 403 is forbidden access. So it maybe being blocked. You can check in the console if the file is there.
Sent from my iPhone
- SarahNewman-804Community Member
I found the console and looked at the Storyline file in Review. I see an error saying that it failed to load the PDF "Failed to load resource: the server responded with a status of 403 ()" and there's a web address. I clicked it, which led to this message:
This XML file does not appear to have any style information associated with it. The document tree is shown below.<Error><Code>AccessDenied</Code><Message>Access Denied</Message><RequestId>Q4NR5B9HSKPHYTRB</RequestId><HostId>gM7J3TsxetllsJbjTfxVjvg3CSCbJtSyB+n3Xl9x6UGwJZwLQoVimuZBn9fYhHNymhHqPCPmUrI=</HostId></Error> - JohannesBurkeCommunity Member
I recommend doing the following:
- Open console (on your browser (e.g. Chrome)).
- Check the error message (you'll likely receive).
- Copy your Java Script code into Chat GPT and ask Chat GPT to debug it.
I've had some pretty cool experiences with Chat GPT this way. I'd say it's quite likely it'll be able to help you, too.
- PhilMayorSuper Hero
Agree about opening the console.
Chat GPT may solve it if not post back
- JohannesBurkeCommunity Member
Still working here, but I'm using a different PDF library.
Related Content
- 10 months ago
- 5 months ago