Forum Discussion
Saving Storyline Variables to a PDF
Hi every one
I am trying to use jsPDF to let the user export the content of 3 text variables. But I keep running in to the same problems.
I have downloaded and added the js-libraries to the relevant places in story_html5.html.
I have also tried using an online SRC instead
I keep getting one of these errors: actionator::exeJavaScript - Cannot read property 'defaultView' of undefined
or actionator::exeJavaScript - options.font.widthOfString is not a function
when I try to run the script.
The first error I get when I use https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js
instead of the various plugins, or if I use both jspdf.js
(or jspdf.debug.js
) , split_text_to_size.js
and standard_font_metrics
.
The latter error I get when I just use jspdf.js
and split_text_to_size.js
.
Here is a link to the online version: http://elearning.hosp.dk/0Afproevning/casef/test/story_html5.html?lms=1
And I have attached both the story-file (SL3) and the story_html5.html-file.
Does anyone have any idea what might be causing this?