3

Let me preface by saying I have seen many questions in a similar vein here, but none with this same scenario that provide a working solution.

I am generating a PDF from a canvas element via javascript. When all is said and done, I have the PDF saved in a variable as a raw-encoded blob with a type of 'application/pdf'. In every major browser - Internet Explorer, Mozilla Firefox, Google Chrome - the following code snippet is enough to initiate the download:

saveAs(blob, 'filename.pdf');

However, Safari does not do anything. I have tried using FileReader's readAsDataURL method as well as URL.createObjectURL and the webkit vendor-specific api for it, then using window.open() to open a new tab/window with that as the contents.

I am looking for any solution that would allow me to initiate this download directly for my Safari users without having to pass the data to a server first.

Morgan
  • 867
  • 3
  • 11
  • 34
  • Possible duplicate of [Download blobs locally using Safari](http://stackoverflow.com/questions/12802109/download-blobs-locally-using-safari) – Morgan Dec 26 '16 at 21:28

0 Answers0