I\'m generating in a server a PDF document that I want to show then in the client. The server side looks like following:
ByteArrayOutputStream baos = generat
You can get base64 string of your pdf stream and pass it to response.
And your method change
$.ajax({
type: "POST",
url: url,
data: {"data": JSON.stringify(myData)},
success: function(data, textStatus, jqXHR) {
var pdfWin= window.open("data:application/pdf;base64, " + data, '', 'height=650,width=840');
// some actions with this win, example print...
},
error: function(jqXHR) {
showError("...");
}
});