Show a PDF with "Document Viewer"


#1

Hello,

I’m using the cordova plugin “Document Viewer” that I found in “https://ionicframework.com/docs/native/document-viewer/”, but, this doc seems outdated and uncompleted.

In fact, I want to open a PDF in my Ionic2 app but I’ve got this error :
“file url ‘assets/myPdf.pdf’ or no viewer for mime type ‘application/pdf’”.

But my PDF is in my wwww/assets folder…

If someone has ever use this cordova plugin or know a good Pdf Viewer that can work on bots Android and IOS, let me know :wink:

Thank you


#2

Try to put your pdf file in the src/assets