Forum Discussion

AshleyStopp-2e9's avatar
AshleyStopp-2e9
Community Member
7 months ago

Multi-Page Download to PDF Functionality

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.
  • jsPDF will allow more than one page also there are other tutorials on here that show how this can be done

    • AshleyStopp-2e9's avatar
      AshleyStopp-2e9
      Community Member

      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? 

      • JohnCooper-be3c's avatar
        JohnCooper-be3c
        Community Member

        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.