yes there are many ways to achieve this, depending on what type of output you use.
if you are running linux the best, in my experience, is wkhtmltopdf. you just point it programmatically at a web page and it renders it in pdf for you. the web page, in your case, would be a browser representation of your webform. wkhtmltopdf will accommodate css styling and javascript and canvas objects because it is based on the webkit engine.
there are also manual ways of creating pdf's such as that which petrosky posted above.