Generate PDF when clicking on a link
<p>MY PROBLEM STATEMENT IS,</p>

<p>I have a set of links in a webpage,which was created in javascript.</p>

<p>Now what I want is if anybody clicks the link it should go to that
   corresponding page and a pdf file should generate automatically. In 
   Ubuntu OS there is an option to generate PDF of any page, but how would I use it
   to generate automatically, if need with some condition also.</p>
