I too want the same this, i.e to get the response in pdf format and without creating any intermediate file (which iText will create)..
please provide any example code if any of you have..
I think this can be done with streams but do not have a working code..
I started with getting the html of the page using document.documentElement.innerHTML
I then sent the html from the client to the server in Ajax call.
Retrieved the html at the server and wrote out a html file.
Then used wkhtmltopdf on it.
Html File : Save as q.html in the dir.
Create a dir and download wkhtmltopdf from the link provided. I am using version 0.99
Save the html file on that dir.
Now in command prompt, cd to that dir and then execute
Look in the dir now. You will see pdf. Neat right?