Forum Discussion
JohnCooper-be3c
2 years agoCommunity Member
Creating downloadable pdf files in Storyline - an update on earlier methods
𝖳𝗁𝖾𝗋𝖾 𝗁𝖺𝗏𝖾 𝖻𝖾𝖾𝗇 𝗆𝖺𝗇𝗒 𝖾𝗑𝖼𝖾𝗅𝗅𝖾𝗇𝗍 𝗉𝗈𝗌𝗍𝗌 𝗈𝗏𝖾𝗋 𝗍𝗁𝖾 𝗒𝖾𝖺𝗋𝗌 𝗈𝗇 𝖼𝗋𝖾𝖺𝗍𝗂𝗇𝗀 𝗉𝖽𝖿 𝖿𝗂𝗅𝖾𝗌 𝖻𝗒 𝗎𝗌𝗂𝗇𝗀 𝖩𝖺𝗏𝖺𝖲𝖼𝗋𝗂𝗉𝗍 𝖿𝗋𝗈𝗆 𝗐𝗂𝗍𝗁𝗂𝗇 𝖲𝗍...
SherriSagers-ca
Community Member
Hi John -
Any idea how to pass a Storyline number variable through to the PDF? I've got your solution working for text fields, but when I try to pass number variables, it seems to break it - or prevent the PDF from printing at all. I searched to see if there's some sort of "form.getNumberField" or ".setNumber", but I'm not finding anything. In my form, I want the number for each color to print in the box, but nothing works unless I comment out those lines - as you can see in my screenshot. (Thanks again for your help!)
SherriSagers-ca
2 years agoCommunity Member
I figured it out! You have to convert the numbers to strings, which I learned can be done simply with this code:
var num = 24;
var str = num.toString();