Multi-Page Download to PDF Functionality
May 08, 2024
By
Ashley Stopp
My colleague and I have triggered JavaScript using the "download to PDF functionality" (utilizing jsPDF) in Storyline. Our PDF hosts text fields a learner has inputted. We are launching this e-learning and realizing that learners are typing more than we anticipated, so we are looking into a multi-page download.
- Does anyone know of a resource my team can use to help us reconfigure our code to host learner output on two separate PDFs as opposed to one?
- Does any one have any other suggestions/solutions? (Keeping the following in mind)
-
- We are unable to reduce the font size further, as it's already set to 10.
- There is little space surrounding the text boxes, so expanding the boxes isn't the best option.
- We don't want to limit the character count learners can input, as this is a journal/reflection-type e-Learning, so freedom is essential.
-
4 Replies
jsPDF will allow more than one page also there are other tutorials on here that show how this can be done
This post was removed by the author
Hey Phil, thank you so much for your quick response! I found this article, but it's not a jsPDF walkthrough. Could you help point me in the right direction?
Hi Ashley
The article you refer to is one of mine in which I was advocating the use of the pdf-lib JavaScript library. We used to use jsPDF but almost always now we use pdf-lib. The advantages are set out in the article - but here's another one that might be relevant - when you create a downloadable file using pdf-lib you can create it by filling in a pdf form template - therefore when you insert your learner's text into a text field in the template you can specify it is 'scrollable'
If you want to see that in action there's a very short demo here
if you just copy a very long piece of text into the body of the note and submit you will see what I mean.
John’s is the example I would go with for multi page. I still like pdfMake for single pages.
Sent from my iPhone