Document Viewer not working


#1

I am new to Ionic. My aim is to view document either word or pdf with zooming(pinch to zoom) and using the hyperlink inside the doc. I will not be using pdf saved under assets but links received from the server.
I tried ng2-pdf -viewer but hyperlinks will not work in this viewer. Now I’m trying to view the document using Document Viewer with Android device for execution. The pdf is not showing and here is my code

app.module.ts

import { DocumentViewer } from ‘@ionic-native/document-viewer’;
providers: [DocumentViewer]

home.ts

import { DocumentViewer, DocumentViewerOptions } from '@ionic-native/document-viewer’
constructor(public navCtrl: NavController,private document: DocumentViewer,public platform: Platform) {

this.platform.ready().then(() => {
  let options: DocumentViewerOptions = {
    title: 'My PDF'
  }
  // this.document.viewDocument('https://vadimdez.github.io/ng2-pdf-viewer/pdf-test.pdf', 'application/pdf', options);
  this.document.viewDocument('../assets/myFile.pdf', 'application/pdf', options)
});  }

How can I display the document in home.ts? Is other mentioned options like zooming/hyperlinks selection are possible with this? I also tried using external link too. Is that right approach?

Cheers.