Forum Discussion
Create single PDF document from Storyline text-entry responses
Hi,
The splitTextToSize function converts the long text into an array of lines. So instead of printing out the entire array at once, the trick is to print out each line of the array in a loop.
Inside the loop, you keep track of how many lines have been printed. When you have reached your Lines Per Page maximum, you add a new page and then reset your number of lines printed counter.
Take a look at the attached sample. It is currently set to print out 15 lines per page.
Hi Russell Killips,
Thanks for giving this sample zip file.
When i checked in output the PDF file is not generated. Please check the attached screenshot and give me the solution once. Thanks in advance.
- RussellKillips-3 years agoCommunity Member
In order to view it, it must be uploaded. Web browser security will prevent it from working locally on your computer.
Here is a link where I have it uploaded:
http://www.knowledgeconstruction.com/split/story.html
- GrahamClark-cc83 years agoCommunity Member
I used the file provided by Teresa above and it worked perfectly. However, like Teresa, the PDF also included the "Create your document" (Print) button. Is there some way of selecting the Print button to create the PDF but not having the button appear in the actual PDF?
- RussellKillips-3 years agoCommunity Member
Hello Graham,
Take a look at this story file.
I added in some code that should hide the print button when printing.