Forum Discussion
Auto-Generate PDF Certificates in Storyline (No HTML Edits Needed)
It has finally worked! Thank you for all your comments. My only last comment is that the quality of the image in the link where the image is hosted looks crystal clear, however when it is placed in the Javascript and then downloaded from Storyline the resolution is not the same, so it decreases its quality a little bit. I contacted Storyline as I thought it was a problem with Storyline, but they said that the issue was about how Javascript handles image compression when converting the image into a document and that I should look for a workaround or a higher-quality rendering method 🫤. This is quite strange because the image that is used in your example looks crystal clear and does not seem to have that problem. I tried ChatGPT this time, but the resolution did not improve. Anyway, I think I will have to accept that!
I'm glad it worked Karenuqkolav1uq !
As far as the image compression, I notice some too, but for my purposes it hasn't been an issue. My hunch is that it is compressed through jsPDF - that is the pdf builder.
What I would try if I were you is to make the hosted image double the size it needs to be; instead of 297x210mm the uploaded image should be 594x420mm. jsPDF will still adjust it to the correct size, but it may be sharper. You shouldn't need to change anything for the code.
Let me know if it works, I'm curious!
- Karenuqkolav1uq6 months agoCommunity Member
Hi Phil_Wingfield, thank you for your advice! I tried making the hosted image double the size (594x420) but then the certificate does not show. It shows a white page with the name and date which are the values that I have used. So, it definitely does not adjust it to the correct size.
Thank you for the tip anyways! :)
Karen
- Phil_Wingfield6 months agoCommunity Member
Karenuqkolav1uq That's odd - I just tried it myself and it worked fine for me and was higher resolution. I have the script set up so that if the image doesn't load, it will still print the name, date, course name, and credit hours. There may be some mistake in your URL somewhere - an extra or missing character perhaps.
ChatGPT is actually really great at catching small typos that break code. I recommend going there and writing something like what I wrote below. It works best if you send it all in one message.
Why is the image at this url: yourimageurl.comnot loading properly when I run this script:
<copy and paste the entire script>
Related Content
- 4 years ago
- 11 months ago
- 3 years ago