Forum Discussion
Saving Storyline Variables to a PDF
Hi Hanne!
Glad it worked out. Absolutely, there's one more file you need to add to the story_content, I've attached it below.
You'll have to change your image to a Data URL, I used this site, http://dataurl.net/#dataurlmaker. It becomes a long file, and exceeds the character limit for JS in Storyline so here are some steps.
1) In the JS editor in storyline add a variable for example:
var imgData = "";
You'll leave it blank for now.
2) Add in another line in the JS editor in stoyline for it's size for example:
doc.addImage(imgData, "JPEG", 30, 52, 240, 155);
You can edit the size and position in the numbers after "JPEG".
3) Publish your storyline content
4) Follow steps 4 and 5 from this post by adding the script lines to the story.html file, but also add:
<script src="story_content/addimage.js" type="text/javascript"></script>
5) Add the .js files, including the addimage.js file to story_content
6) Open the user.js file in story_content and add in Data URL image to the value of image variable (like mine imgData)
7) Zip the folder and publish to the LMS
Let me know if this works!