How to download a html page in PDF format using php or javascript?

     

I have a page (display.php) that gives the results of a form in a div which i customized and looks like a quote.


I wanted to know how to download that results in a pdf file by using PHP or Javascript??


Please help i tried the other solution in stackoverflow but its not working like the code   below


  
  
  

Hello this is a H3 tag

     

a pararaph