Rendering a local PDF in Ionic

I know this has been asked a number of times, but i’m stuck.

I’ve got

<a class="item" href="#" onclick="'assets/ds.pdf', '_system', 'location=no')">

the pdf is in www/assets/

When I run it in my browser it works, but when i try it on the emulator it doesn’t display.

Any ideas?

Android does not support viewing PDFs out of the box in a WebView. On iOS it works ok.

There are options:

  1. Using Google Docs to render the PDF for you:
  2. For offline use, you can try with PDF.js:
    And example:
1 Like