I'm trying to display a PDF(which is created in the server side and pass to the client side as a web stream) through an AJAX call. My code is given below:
jQuery.ajax({
type: "POST",
processData: false,
url: "aaaa.p?name=pdf",
data: inputxml,
contentType: "application/xml; charset=utf-8",
success: function(data)
{
// here the data is the PDF stream i'm getting from the server side.
}
});
The 'inputxml' is containing input parameters for the server to create the PDF. and the 'data' in the success function containing PDF stream. Is there any way to open the PDF file on the browser inside the success function of the AJAX call with-out doing any page submit? In the server side the PDF is not physically generated also. Highly appreciate your help....
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…