Guest User

Untitled

a guest
Jul 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. ResponseEntity.ok()
  2. .headers(result.getHttpHeaders())
  3. .body(new InputStreamResource(result.getInputStream()));
  4.  
  5. $http.get("path/pdf",
  6. { params:params },
  7. { responseType:"arraybuffer" }
  8. )
  9. .then(function(response){
  10. console.log(response.data);
  11. var blob = new Blob([response.data], {type: 'application/pdf'});
  12. FileSaver.saveAs(blob, 'arquivo.pdf');
  13. });
Add Comment
Please, Sign In to add comment