Forum Discussion
Auto-Generate PDF Certificates in Storyline (No HTML Edits Needed)
Wow this is great, and I second that it would be ideal for this to be built into Storyline for ease of use.
For those of us in countries using different date formats, I think a small adjustment to line 24 in the code should reformat the date on the certificate for us:
current: const formattedDate = `${mm}/${dd}/${yyyy}`;
adjusted: const formattedDate = `${dd}/${mm}/${yyyy}`;
JessicaHoskin​  Definitely! That would work great and is probably what I would do.
You could also do something like this, which I just looked up how to do out of curiosity:
const now = new Date();
const options = { year: 'numeric', month: 'numeric', day: 'numeric' };
const formattedDate = now.toLocaleDateString('en-US', options);In line 3, the 'en-US' argument shows that it's English, in the United States and would return today as "8/21/2025". You could change it to another region by googling your language and country's JavaScript language and region tag. For example, changing it to 'es-ES' (spanish-spain) would return "21/8/2025".
You could get more variation by changing month in line 2 to 'long' instead of 'numeric.' en-US would return "August 21, 2025", but es-ES or es-US would return "21 de agosto de 2025".
Related Content
- 10 months ago
- 9 months ago
- 4 years ago
- 10 months ago