Email copy of slide

Thanks, will take a look and update my training units.

Hi Nam,

Works perfectly now. Thank you so much for all you do to support the AP community. World-class support!

Best,
Scott

3 Likes

That sounds good and thank you for your compliment :).

Regards,

I had all the same issues and to bypass all the code related to style and rendering, I just created a blank certificate in powerpoint, saved as image, then used it as the background in for the certificate slide so the only items added were the learner name, date and download button. The email thing is too complicated for me :smiley:

The download slide function works when you create a scorm module, but not if you don’t… if you get what I mean. I exported without reporting, and generate an index file etc… but when you click the button, instead of downloading the certificate file, it brings you back to the beginning of the slideshow…?

I have been using this for a while now and as of Today the web API results in an error.
Can someone tell me what is going wrong?
So the only issue now is that I get a “Result: error” message when attempting to send the cert by email. I have copied your Code.gs exactly per your guidance above. Any suggestions?

Hi Chris,

It seems that you reach the limit of MailApp. With normal Gmail users, it must not exceed 100 email recipients per day. You can see the details here:
https://developers.google.com/apps-script/guides/services/quotas

Regards,

Thanks Nam, that explains a lot.

Hi Namnt,

I have been following your instructions as I want users to be able to download the certificate at the end of the module.
I have copied the download button + js but when I run the module, click the download button, it takes me to the beginning of the module again. It happened with your example as well.
I run the module as HTML 5.

Please could you advise what could be wrong, please?

Thanks,

Amaya

Hi Amaya,

Please send us your project to support@atomisystems.com. We will take a look and get back to you.

Regards,

Hi @Amaya,

We can save the certificate with your project.
Please note that due to security reasons, this function only works when you upload the HTML5 output to a web server or preview your project from ActivePresenter.
It’ll not work if you open the HTML5 output directly from the file system (the URL starts with file:///)

Regards

Hello, I have downloaded and tested the sample presentation certificate.approj.

It works, and that is very good!

I have one important question: I would think PDF would be the preferred format not png.

I can create my own certificate in pdf. How can I change the script to use my pdf certificate?
And where should this certificate be located?

Hi Joseph,

It seems it is possible to generate PDF report and send it via email by using Google Apps Script. Please take a look at this tutorial:

Regards,

This is great news, now we just need someone smart enough to combined the two app scripts so that we can email a results PDF.

1 Like

Hi namnt, hi all,

the way the Certificate is downloaded as PNG works fine as long as I run my slides (Test) in HTML5 Preview-Mode (localhost). However, when I do the actual HTML5-export and run the exported HTML-file, stored to my local drive, I get an error:
Uncaught DOMException: Failed to execute ‘toDataURL’ on ‘HTMLCanvasElement’: Tainted canvases may not be exported.
I do not want to use the resulting file online but rather locally. Any idea?
Here is the full stack:

Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.
    at window._apDownloadOrEmailCertificate (file:///C:/Program%20Files%20(x86)/andsoon/rlprez.js:166:30)
    at HTMLAnchorElement.onclick (file:///C:/Program%20Files%20(x86)/andsoon/test.html:50:2)
window._apDownloadOrEmailCertificate @ rlprez.js:166
onclick @ test.html:50

All the best,
MoS

Hi MoS,

As ToanLS mentioned above, the function will not work if you open the HTML5 output directly from the file system. You should upload the output to a webserver.

Regards,