-
-
Save anupammaiti/1354e50ba5c1412e845b04f237ce03a0 to your computer and use it in GitHub Desktop.
jQuery.ajax() download pdf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({ | |
url: url, | |
data: data, | |
success: function (data) { | |
var blob = new Blob([data]); | |
var link = document.createElement('a'); | |
link.href = window.URL.createObjectURL(blob); | |
link.download = "Dossier.pdf"; | |
link.click(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment