Help - Passing Variables from SL360 to PDF using Javascript
Feb 05, 2020
By
Mike Clark
Hi Heroes,
I'm trying to figure out a way to get variables out of storyline and replaces certain form fields in a pdf using javascript.
The pdf is placed in a folder in the published SL package.
I'm using this javascript when the pdf opens (in Acrobat):
var player = GetPlayer();
noble = this.getField("1");
brand = this.getField("3");
behavior = this.getField("2");
incite = this.getField("4");
noble.value = player.GetVar("TextEntry");
brand.value = player.GetVar("TextEntry1");
behavior.value = player.GetVar("TextEntry2");
incite.value = player.GetVar("TextEntry3");
In which my forms in acrobat are 1, 2, 3 & 4 and my SL variables are TextEntry, TextEntry1, etc
I would like for the SL variables to be passed on so when the PDF is opened:
1 = TextEntry
2 = TextEntry1
3 = TextEntry2
4 = TextEntry3
Thank you in advance for your help!
3 Replies
You should use the PDF Maker to get the variables and generate a PDF file. The widget will give you the exact trigger code to use.
I've looked into PDF Maker, but the PDF I'm designing for output isn't a text document. Its more of a job aid that learners could use as a wallpaper. It doesn't look like PDF Maker supports visually designed documents.
Hi,
Can you share the storyline file?
This discussion is closed. You can start a new discussion or contact Articulate Support.