You don't necessarily need Ajax for this. Just an link is enough if you set the content-disposition to attachment in the server side code. This way the parent page will just stay open, if that was your major concern (why would you unnecessarily have chosen Ajax for this otherwise?).
How To Complete Pdf Documents
Besides, there is no way to handle this nicely acynchronously. PDF is not character data. It's binary data.
AJAX: A Beginner's Guide (Beginner's Guide. - Sharad Mishra.
You can't do stuff like $(element).load. You want to use completely new request for this. For that pdf is perfectly suitable. To assist you more with the server side code, you'll need to tell more about the language used and post an excerpt of the code attempts. I don't really think that any of the past answers spotted out the problem of the original poster.
They all presume a GET request while the poster was trying to POST data and get a download in response. In the course of searching for any better answer we found this. In its 'heart' it creates a 'temporary' HTML form containing the given data as input fields. This form is appended to the document and posted to the desired URL.
Right after that the form is removed again: jQuery('+inputs+'