Forum Discussion
Creating downloadable pdf files in Storyline - an update on earlier methods
Hi, I know this thread is fairly ancient but I have implemented this PDF creation and it worked fantastically a week ago. I went back to review the course I'm using it in and all of a sudden it doesn't work, it didn't work in Chrome, Firefox, or Edge so I was wondering if anyone else ran into the same problem, did something on the open source Javascript end get changed or blocked? Thanks again as this was a great resource that my team loved when I got it up and running.
- JohnCooper-be3c6 months agoCommunity Member
Having originally started this thread 3 years ago - I'm glad to have the opportunity to post this very important update as it may affect anyone using the code I loaded. In my original example, I used an 'import' statement to fetch the necessary JavaScript library modules at runtime from unpkg.com and this code started throwing up CORS-related errors in certain browsers last week.
The root cause lies in unpkg.com not consistently sending an "Access-Control-Allow-Origin: *" CORS header with all its returned files. This header is now a mandatory requirement for ESM imports. As browsers enhance their security protocols, this previously functional code may now encounter failures.I've posted a fuller discussion of this issue in the JavaScript discussion group - with some simple ways to fix the problem.
In fairness to PhilMayor, I think he did point out, at the time, some potential risks in using dynamic loading of JavaScript libraries - I certainly seem to remember a discussion with a couple of super heroes on that subject 😀 - but it is just so much more convenient to load code in this way if you don't have easy access to modify the published HTML.
Related Content
- 7 months ago
- 2 months ago