user
@diana
PDF not pulling on Storyline
Hello,

I entered the javascript into a trigger for a "print" button on the certificate in storyline 360.

The new window pops and opens to:
https://cluelabs.com/stencil/display/widget-pdf-maker-display?chart=MzMzfDI3ODh8Yjg4MTgzNDU5MmNjMDljOGM2YWYxZjhmYWRkNTM2OGQ&vardata=sent

but after that nothing happens.

I don't see anything being blocked for downloading.

Can someone please help?

Thank you,

Diana
reply
Reply
user
@support
Hi Diana. You can upload your story file and post a link below, I'll check.
reply
Reply
user
@diana
Hello John,

Thank you so much. Here is the file.

https://drive.google.com/drive/folders/1ljupbb21aXDGBMQEFBf5heBRhZ9qAzFi?usp=sharing
reply
Reply
user
@support
Diana, you did everything right. The issue was that the database could only save documents up to 65KB and the image you added exceeded that. This was an oversight, it's reasonable to expect that some documents will be larger than 65KB, so I've put in a request to upgrade the corresponding database field to the next size - 16MB. But also see if you can resize the image you're adding to make sure it fits. The old document didn't save properly and won't open, so you will need to delete it, create a new PDF widget, and update the trigger in Storyline. Sorry about that and thank you for reporting, this allowed us to improve the widget for everyone.
reply
Reply
user
@diana
Hello John,

I resized the storyline project and retried. It pulls the pdf now but my %fname% %lname% and %date% are not inserting into the pdf.
reply
Reply
user
@diana
PS: This is the code it directed me to enter:

var clabsPDFWindow = window.open();
var xhttp=new XMLHttpRequest,targlink="https://cluelabs.com/stencil/display/widget-pdf-maker-display?chart=MzQwfDI3ODh8NmJjNzdkYzQwOWVlODY0NmYyOTFiNjJmNDQ4MTJkYTQ";xhttp.onreadystatechange=function(){if(4==this.readyState&&200==this.status&&""!=this.response){var t=GetPlayer(),e=JSON.parse(xhttp.response),n="";e.forEach(function(e,a){n+="&"+encodeURIComponent(e)+"="+btoa(encodeURIComponent(t.GetVar(e))).replace("=","")}),clabsPDFWindow.location=targlink+n+"&vardata=sent",t.SetVar("stencilrendered",parseInt(t.GetVar("stencilrendered"))+1)}},xhttp.open("GET",targlink,!0),xhttp.send();
reply
Reply
user
@support
Diana, you have the words %fname% %lname% and %date% in the image, it's not the actual text, it's an illustration. If you use the variable references in your message as text, Storyline will replace them with variable values before downloading the file. When the words are drawn in the image, there's no way for it to do that.
reply
Reply
user
@diana
Please let me know your thoughts. I have the %fname% %lname% and %date% in storyline as text. What I did was copy and paste my storyline text lines and placed them inside cluelabs pdf widget. Should I be following a different protocol?
reply
Reply
user
@diana
PS: When I run my storyline file on the LMS it pulls the user's registered name and the date properly.
reply
Reply
user
@support
I see what you're saying, yes, I tried copying from Storyline and can confirm that it's pasting as an image, not text. Consider entering the text directly in the widget editor instead, that should help.
reply
Reply
user
@diana
Hi there!

Do you have any tips on pulling the correct text format?

What I did was create the same certificate in a word doc with text, then I copied and pasted it in.

The text didn't copy over with font/size/etc
reply
Reply
user
@support
Styling with the tools available in the online editor is really the only option at this point.
reply
Reply