3

I have a PDF storred in a Blob

var pdfBlob = new Blob(buffers, {type: 'application/pdf'});

From that I create an Object URL

var pdfURL = URL.createObjectURL(pdfBlob);

That gives something like blob:chrome-extension%3A//mlbdgii.

If I manually copy the URL to a Chrome tab the PDF is successfully opened. However if I try to open it using chrome.app.window.create I just get a "This webpage is not found" error.

So the question is, can I open an Object URL using this method? If not, is there a workaround to get a PDF stored in an ObjectURL to be displayed in a Chrome App or Chrome Tab ?

lostsource
  • 21,070
  • 8
  • 66
  • 88
  • I believe the answer you want is here: http://stackoverflow.com/questions/20388786/how-to-display-data-uri-for-pdf-in-chrome-app – Marc Rochkind Jun 26 '14 at 14:17

1 Answers1

0

Check out this: https://stackoverflow.com/a/27256841/3826713 , I had a similar issue and webview was my workaround for it.

Community
  • 1
  • 1
UCJava
  • 307
  • 4
  • 19