By pure conicidence I loaded a new FREE Advanced Workshop entitled "Creating downloadable notes or a learning journal from a Storyline Course" just yesterday!!
This course takes the learner through creating a downloadable pdf file step by step using the exact same code (pretty much) that you are using.
If anyone is interested they can find out more here:
Course Catalogue (profilelearning.com)
You will need to enrol on the course and will be sent an email to confirm your identity - but it is free (you will be invite to donate - but that's voluntary :)