Install this application in your environment and what ever the html thing or other things you want to download in the form of pdf you can download by using this tool and you can download with the help of java script.
Just go to the application and place the things in the container that you want to download as pdf , and pass that container id as input parameter for java script and publish your application and use it.