I'm building an app using Cordova/ionic in which I now fetch a PDF from an API (which I am authenticated with). I then want to display this PDF in the inAppBrowser which I normally open with window.open('http://example.com/the-file.pdf', "_blank", "location=no");
. But since I already fetched the data I cannot provide a url, but instead I want to provide the data as binary.
I searched around but I only found this SO answer, which unfortunately doesn't work for me.
Does anybody know how I can pass a PDF as binary data through window.open()
? All tips are welcome!