HomeStudyJavascript code to create pdf file