Forum Discussion
JohnCooper-be3c
3 years agoCommunity Member
Creating a pdf file from Storyline running under an LMS
I know there are many excellent examples of how to create a pdf file in Storyline using javascript libraries such as jspdf and I have done this successfully in projects compiled for the web...
......
JohnCooper-be3c
8 months agoCommunity Member
Hi Sarah,
I did get the multi-page pdf creation working BUT, as I explained above, I don't use the jsPDF library anymore. I use pdf-lib because:
- This reads a pdf form and fills the form in (i.e. no background image and then working out where everything goes) the pdf form can be as many pages as you like.
- You can change the pdf form without having to modify the JavaScript (as long as the form field names remain the same)
- It's way simpler to code and quicker to implement
- You can load the pdf-lib dynamically (i.e. you don't have to change the story.html file after publishing
There is a detailed example and the code is explained in this article:
I know it sounds like a backward step to change your code if you have it partially working but, believe me, you won't regret changing to pdf-lib it is much more powerful and so much quicker to code and use.
Best regards, John